diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 17:02:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 17:02:07 +0000 |
commit | c4f883a6d4a7e2d31ea641f36f7f5150a2cbc349 (patch) | |
tree | 946d49876311e62e24e56605f803ac9cc5b6e54d /chrome/browser/component_updater | |
parent | 803f91036d5674629f9e64205cacd31fb0f7d5c2 (diff) | |
download | chromium_src-c4f883a6d4a7e2d31ea641f36f7f5150a2cbc349.zip chromium_src-c4f883a6d4a7e2d31ea641f36f7f5150a2cbc349.tar.gz chromium_src-c4f883a6d4a7e2d31ea641f36f7f5150a2cbc349.tar.bz2 |
Create an API around UtilityProcessHost and use that from chrome.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9317074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/component_updater')
-rw-r--r-- | chrome/browser/component_updater/component_updater_service.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc index 8849a9b..cb0d94f 100644 --- a/chrome/browser/component_updater/component_updater_service.cc +++ b/chrome/browser/component_updater/component_updater_service.cc @@ -25,8 +25,9 @@ #include "chrome/common/chrome_utility_messages.h" #include "chrome/common/chrome_version_info.h" #include "chrome/common/extensions/extension.h" -#include "content/browser/utility_process_host.h" #include "content/public/browser/notification_service.h" +#include "content/public/browser/utility_process_host.h" +#include "content/public/browser/utility_process_host_client.h" #include "content/public/common/url_fetcher_delegate.h" #include "content/public/common/url_fetcher.h" #include "googleurl/src/gurl.h" @@ -34,6 +35,8 @@ #include "net/base/load_flags.h" using content::BrowserThread; +using content::UtilityProcessHost; +using content::UtilityProcessHostClient; // The component updater is designed to live until process shutdown, so // base::Bind() calls are not refcounted. @@ -237,9 +240,9 @@ class CrxUpdateService : public ComponentUpdateService { virtual Status RegisterComponent(const CrxComponent& component) OVERRIDE; // The only purpose of this class is to forward the - // UtilityProcessHost::Client callbacks so CrxUpdateService does + // UtilityProcessHostClient callbacks so CrxUpdateService does // not have to derive from it because that is refcounted. - class ManifestParserBridge : public UtilityProcessHost::Client { + class ManifestParserBridge : public UtilityProcessHostClient { public: explicit ManifestParserBridge(CrxUpdateService* service) : service_(service) {} @@ -597,10 +600,9 @@ void CrxUpdateService::ParseManifest(const std::string& xml) { CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results()); } } else { - UtilityProcessHost* host = - new UtilityProcessHost(new ManifestParserBridge(this), - BrowserThread::UI); - host->set_use_linux_zygote(true); + UtilityProcessHost* host = UtilityProcessHost::Create( + new ManifestParserBridge(this), BrowserThread::UI); + host->EnableZygote(); host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml)); } } |