| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 6599b978a8cba3bdcec2051fc9b552119086d46c..523e4c28ad020ed8eda9a23034c0d637d6319c7c 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -602,6 +602,14 @@ ProfileImpl::~ProfileImpl() {
|
| NewRunnableFunction(&BrowsingDataRemover::ClearGearsData, path_));
|
| }
|
|
|
| + if (db_tracker_) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::FILE, FROM_HERE,
|
| + NewRunnableMethod(
|
| + db_tracker_.get(),
|
| + &webkit_database::DatabaseTracker::Shutdown));
|
| + }
|
| +
|
| // DownloadManager is lazily created, so check before accessing it.
|
| if (download_manager_.get()) {
|
| // The download manager queries the history system and should be shut down
|
| @@ -1306,7 +1314,8 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
|
| GetExtensionSpecialStoragePolicy(),
|
| quota_manager_->proxy());
|
| db_tracker_ = new webkit_database::DatabaseTracker(
|
| - GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy(),
|
| + GetPath(), IsOffTheRecord(), clear_local_state_on_exit_,
|
| + GetExtensionSpecialStoragePolicy(),
|
| quota_manager_->proxy(),
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
|
| webkit_context_ = new WebKitContext(
|
| @@ -1381,6 +1390,10 @@ void ProfileImpl::Observe(NotificationType type,
|
| appcache_service_->SetClearLocalStateOnExit(
|
| clear_local_state_on_exit_);
|
| }
|
| + if (db_tracker_) {
|
| + db_tracker_->SetClearLocalStateOnExit(
|
| + clear_local_state_on_exit_);
|
| + }
|
| } else if (*pref_name_in == prefs::kGoogleServicesUsername) {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| profile_manager->RegisterProfileName(this);
|
|
|