Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3632)

Unified Diff: chrome/browser/profile.cc

Issue 2746003: Support WebSQLDatabases in incognito mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/database_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
===================================================================
--- chrome/browser/profile.cc (revision 49482)
+++ chrome/browser/profile.cc (working copy)
@@ -262,11 +262,18 @@
}
virtual ~OffTheRecordProfileImpl() {
- NotificationService::current()->Notify(
- NotificationType::PROFILE_DESTROYED,
- Source<Profile>(this),
- NotificationService::NoDetails());
- CleanupRequestContext(request_context_);
+ NotificationService::current()->Notify(
+ NotificationType::PROFILE_DESTROYED,
+ Source<Profile>(this),
+ NotificationService::NoDetails());
+ CleanupRequestContext(request_context_);
+
+ // Clean up all DB files/directories
+ ChromeThread::PostTask(
+ ChromeThread::FILE, FROM_HERE,
+ NewRunnableMethod(
+ db_tracker_.get(),
+ &webkit_database::DatabaseTracker::DeleteIncognitoDBDirectory));
}
virtual ProfileId GetRuntimeId() {
@@ -293,8 +300,10 @@
}
virtual webkit_database::DatabaseTracker* GetDatabaseTracker() {
- if (!db_tracker_)
- db_tracker_ = new webkit_database::DatabaseTracker(FilePath());
+ if (!db_tracker_) {
+ db_tracker_ = new webkit_database::DatabaseTracker(
+ GetPath(), IsOffTheRecord());
+ }
return db_tracker_;
}
@@ -958,8 +967,10 @@
}
webkit_database::DatabaseTracker* ProfileImpl::GetDatabaseTracker() {
- if (!db_tracker_)
- db_tracker_ = new webkit_database::DatabaseTracker(GetPath());
+ if (!db_tracker_) {
+ db_tracker_ = new webkit_database::DatabaseTracker(
+ GetPath(), IsOffTheRecord());
+ }
return db_tracker_;
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/database_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698