Simple fix so the utility process respects single process mode.

BUG=24746

Review URL: http://codereview.chromium.org/339033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30289 0039d316-1c4b-4281-b951-d872f2087c98
parent ca49bcfa
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/web_resource/web_resource_service.h" #include "chrome/browser/web_resource/web_resource_service.h"
#include "base/command_line.h"
#include "base/string_util.h" #include "base/string_util.h"
#include "base/time.h" #include "base/time.h"
#include "base/values.h" #include "base/values.h"
...@@ -10,6 +11,7 @@ ...@@ -10,6 +11,7 @@
#include "chrome/browser/chrome_thread.h" #include "chrome/browser/chrome_thread.h"
#include "chrome/browser/profile.h" #include "chrome/browser/profile.h"
#include "chrome/browser/net/url_fetcher.h" #include "chrome/browser/net/url_fetcher.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
...@@ -106,7 +108,8 @@ class WebResourceService::UnpackerClient ...@@ -106,7 +108,8 @@ class WebResourceService::UnpackerClient
// If we don't have a resource_dispatcher_host_, assume we're in // If we don't have a resource_dispatcher_host_, assume we're in
// a test and run the unpacker directly in-process. // a test and run the unpacker directly in-process.
bool use_utility_process = bool use_utility_process =
web_resource_service_->resource_dispatcher_host_ != NULL; web_resource_service_->resource_dispatcher_host_ != NULL &&
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
#if defined(OS_POSIX) #if defined(OS_POSIX)
// TODO(port): Don't use a utility process on linux (crbug.com/22703) or // TODO(port): Don't use a utility process on linux (crbug.com/22703) or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment