summaryrefslogtreecommitdiffstats
path: root/chrome/browser/component_updater
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 17:02:07 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 17:02:07 +0000
commitc4f883a6d4a7e2d31ea641f36f7f5150a2cbc349 (patch)
tree946d49876311e62e24e56605f803ac9cc5b6e54d /chrome/browser/component_updater
parent803f91036d5674629f9e64205cacd31fb0f7d5c2 (diff)
downloadchromium_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.cc16
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));
}
}