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

Unified Diff: chrome/browser/service/service_process_control.cc

Issue 3872002: Thread IO safety: file_util annotated, IO thread blocked from doing IO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 10 years, 2 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
Index: chrome/browser/service/service_process_control.cc
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index fcef987bdd27db386f6fcd72049b510258d704a2..f8798598637b598c20e6feea12a2c452f81c0e76 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -9,6 +9,7 @@
#include "base/process_util.h"
#include "base/stl_util-inl.h"
#include "base/thread.h"
+#include "base/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/io_thread.h"
@@ -55,7 +56,14 @@ class ServiceProcessControl::Launcher
void DoDetectLaunched(Task* task) {
const uint32 kMaxLaunchDetectRetries = 10;
- launched_ = CheckServiceProcessReady();
+ {
+ // We should not be doing blocking disk IO from this thread!
+ // Temporarily allowed until we fix
+ // http://code.google.com/p/chromium/issues/detail?id=60207
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ launched_ = CheckServiceProcessReady();
+ }
+
if (launched_ || (retry_count_ >= kMaxLaunchDetectRetries)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this, &Launcher::Notify, task));
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud_uitest.cc ('k') | chrome/common/extensions/extension_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698