| 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_;
|
| }
|
|
|
|
|