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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 6308001: When clearing plugin data at shutdown, wait for it to finish. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoops Created 9 years, 11 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/browsing_data_remover.cc » ('j') | chrome/browser/plugin_data_remover.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 7a14807a7b720d825a7259736ca9503d0a51671a..9d6aa03d874aca9d07fabf0cd7e21c8bbbae901d 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -542,7 +542,7 @@ void BrowserProcessImpl::Observe(NotificationType type,
if (prefs->GetBoolean(prefs::kClearPluginLSODataOnExit) &&
local_state()->GetBoolean(prefs::kClearPluginLSODataEnabled)) {
plugin_data_remover_ = new PluginDataRemover();
- plugin_data_remover_->StartRemoving(base::Time(), NULL);
+ plugin_data_remover_->StartRemoving(base::Time(), true, NULL);
}
}
} else {
@@ -551,13 +551,8 @@ void BrowserProcessImpl::Observe(NotificationType type,
}
void BrowserProcessImpl::WaitForPluginDataRemoverToFinish() {
- if (!plugin_data_remover_.get() || !plugin_data_remover_->is_removing())
- return;
- plugin_data_remover_->set_done_task(new MessageLoop::QuitTask());
- base::Time start_time(base::Time::Now());
- MessageLoop::current()->Run();
- UMA_HISTOGRAM_TIMES("ClearPluginData.wait_at_shutdown",
- base::Time::Now() - start_time);
+ if (plugin_data_remover_.get())
+ plugin_data_remover_->WaitForPluginToExit();
}
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | chrome/browser/plugin_data_remover.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698