Issue 348: can view old incognito cache if main process left running
Same place we clear cookies when the last incognito window is closed,
destroy the entire incognito profile which by implication destoys the
incognito cache.
BUG=348
Review URL: http://codereview.chromium.org/53101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12688 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 08b3260..a290fa09 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -138,6 +138,11 @@
return this;
}
+ virtual void DestroyOffTheRecordProfile() {
+ // Suicide is bad!
+ NOTREACHED();
+ }
+
virtual Profile* GetOriginalProfile() {
return profile_;
}
@@ -504,6 +509,10 @@
return off_the_record_profile_.get();
}
+void ProfileImpl::DestroyOffTheRecordProfile() {
+ off_the_record_profile_.reset();
+}
+
Profile* ProfileImpl::GetOriginalProfile() {
return this;
}