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

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

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.cc
===================================================================
--- chrome/browser/metrics/metrics_service.cc (revision 133458)
+++ chrome/browser/metrics/metrics_service.cc (working copy)
@@ -152,6 +152,7 @@
#include "base/string_number_conversions.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -1438,6 +1439,8 @@
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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698