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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: chrome/browser/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 58f398d2fe0359c878f884166df193d7a5b325ce..680e4a591a1c2998217f064bd5316109895021e6 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -1723,27 +1723,11 @@ bool MetricsService::UmaMetricsProperlyShutdown() {
return clean_shutdown_status_ == CLEANLY_SHUTDOWN;
}
-// For use in hack in LogCleanShutdown.
-static void Signal(base::WaitableEvent* event) {
- event->Signal();
-}
-
void MetricsService::LogCleanShutdown() {
// Redundant hack to write pref ASAP.
PrefService* pref = g_browser_process->local_state();
pref->SetBoolean(prefs::kStabilityExitedCleanly, true);
pref->CommitPendingWrite();
- // Hack: TBD: Remove this wait.
- // We are so concerned that the pref gets written, we are now willing to stall
- // the UI thread until we get assurance that a pref-writing task has
- // completed.
- base::WaitableEvent done_writing(false, false);
- BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- base::Bind(Signal, &done_writing));
- // http://crbug.com/124954
- base::ThreadRestrictions::ScopedAllowWait allow_wait;
- done_writing.TimedWait(base::TimeDelta::FromHours(1));
-
// Redundant setting to assure that we always reset this value at shutdown
// (and that we don't use some alternate path, and not call LogCleanShutdown).
clean_shutdown_status_ = CLEANLY_SHUTDOWN;

Powered by Google App Engine
This is Rietveld 408576698