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

Unified Diff: chrome/browser/web_resource/web_resource_service.cc

Issue 256036: Do not use the utility process on linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/utility_process_host_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/web_resource_service.cc
===================================================================
--- chrome/browser/web_resource/web_resource_service.cc (revision 27895)
+++ chrome/browser/web_resource/web_resource_service.cc (working copy)
@@ -103,14 +103,23 @@
void Start() {
AddRef(); // balanced in Cleanup.
- if (web_resource_service_->resource_dispatcher_host_) {
+ // If we don't have a resource_dispatcher_host_, assume we're in
+ // a test and run the unpacker directly in-process.
+ bool use_utility_process =
+ web_resource_service_->resource_dispatcher_host_ != NULL;
+
+#if defined(OS_POSIX)
+ // TODO(port): Don't use a utility process on linux (crbug.com/22703) or
+ // MacOS (crbug.com/8102) until problems related to autoupdate are fixed.
+ use_utility_process = false;
+#endif
+
+ if (use_utility_process) {
ChromeThread::GetMessageLoop(ChromeThread::IO)->PostTask(FROM_HERE,
NewRunnableMethod(this, &UnpackerClient::StartProcessOnIOThread,
web_resource_service_->resource_dispatcher_host_,
MessageLoop::current()));
} else {
- // If we don't have a resource_dispatcher_host_, assume we're in
- // a test and run the unpacker directly in-process.
WebResourceUnpacker unpacker(json_data_);
if (unpacker.Run()) {
OnUnpackWebResourceSucceeded(*unpacker.parsed_json());
@@ -287,4 +296,3 @@
DoubleToWString(base::Time::Now().ToDoubleT()));
prefs_->SetString(prefs::kNTPTipsServer, web_resource_server_);
}
-
« no previous file with comments | « chrome/browser/utility_process_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698