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

Unified Diff: chrome/browser/extensions/extension_updater.cc

Issue 9317074: Create an API around UtilityProcessHost and use that from chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/extensions/extension_updater.cc
===================================================================
--- chrome/browser/extensions/extension_updater.cc (revision 120256)
+++ chrome/browser/extensions/extension_updater.cc (working copy)
@@ -37,9 +37,9 @@
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/utility_process_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/utility_process_host.h"
#include "content/public/common/url_fetcher.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -58,6 +58,8 @@
using base::Time;
using base::TimeDelta;
using content::BrowserThread;
+using content::UtilityProcessHost;
+using content::UtilityProcessHostClient;
using prefs::kExtensionBlacklistUpdateVersion;
using prefs::kLastExtensionsUpdateCheck;
using prefs::kNextExtensionsUpdateCheck;
@@ -620,7 +622,7 @@
}
// Utility class to handle doing xml parsing in a sandboxed utility process.
-class SafeManifestParser : public UtilityProcessHost::Client {
+class SafeManifestParser : public UtilityProcessHostClient {
public:
// Takes ownership of |fetch_data|.
SafeManifestParser(const std::string& xml, ManifestFetchData* fetch_data,
@@ -652,9 +654,9 @@
bool use_utility_process = rdh &&
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
if (use_utility_process) {
- UtilityProcessHost* host = new UtilityProcessHost(
+ UtilityProcessHost* host = UtilityProcessHost::Create(
this, BrowserThread::UI);
- host->set_use_linux_zygote(true);
+ host->EnableZygote();
host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_));
} else {
UpdateManifest manifest;
@@ -678,7 +680,7 @@
}
}
- // UtilityProcessHost::Client
+ // UtilityProcessHostClient
virtual bool OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SafeManifestParser, message)
« no previous file with comments | « chrome/browser/extensions/extension_management_api.cc ('k') | chrome/browser/extensions/sandboxed_extension_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698