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

Unified Diff: chrome/browser/extensions/updater/safe_manifest_parser.cc

Issue 19085002: Get rid of ResourceDispatcherHost check in safe_manifest_parser.cc. Single process mode is now hand… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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/extensions/updater/extension_updater_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/extensions/updater/safe_manifest_parser.cc
===================================================================
--- chrome/browser/extensions/updater/safe_manifest_parser.cc (revision 211250)
+++ chrome/browser/extensions/updater/safe_manifest_parser.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "chrome/common/chrome_utility_messages.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_message_macros.h"
@@ -45,36 +44,11 @@
void SafeManifestParser::ParseInSandbox() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- // TODO(asargent) we shouldn't need to do this branch here - instead
- // UtilityProcessHost should handle it for us. (http://crbug.com/19192)
- bool use_utility_process = content::ResourceDispatcherHost::Get() &&
- !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
- if (use_utility_process) {
- content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
- this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get());
- host->EnableZygote();
- host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_));
- } else {
- UpdateManifest manifest;
- if (manifest.Parse(xml_)) {
- if (!BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(
- &SafeManifestParser::OnParseUpdateManifestSucceeded, this,
- manifest.results()))) {
- NOTREACHED();
- }
- } else {
- if (!BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(
- &SafeManifestParser::OnParseUpdateManifestFailed, this,
- manifest.errors()))) {
- NOTREACHED();
- }
- }
- }
+ content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
+ this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get());
+ host->EnableZygote();
+ host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_));
}
bool SafeManifestParser::OnMessageReceived(const IPC::Message& message) {
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698