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

Side by Side Diff: chrome/browser/extensions/extension_updater.cc

Issue 464073: Have the utility process run out of process on Linux again by (Closed)
Patch Set: fix Created 11 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/sandboxed_extension_unpacker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_updater.h" 5 #include "chrome/browser/extensions/extension_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 278
279 // Creates the sandboxed utility process and tells it to start parsing. 279 // Creates the sandboxed utility process and tells it to start parsing.
280 void ParseInSandbox(ResourceDispatcherHost* rdh) { 280 void ParseInSandbox(ResourceDispatcherHost* rdh) {
281 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 281 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
282 282
283 // TODO(asargent) we shouldn't need to do this branch here - instead 283 // TODO(asargent) we shouldn't need to do this branch here - instead
284 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) 284 // UtilityProcessHost should handle it for us. (http://crbug.com/19192)
285 bool use_utility_process = rdh && 285 bool use_utility_process = rdh &&
286 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); 286 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
287
288 #if defined(OS_LINUX)
289 // TODO(port): Don't use a utility process on linux (crbug.com/22703).
290 use_utility_process = false;
291 #endif
292
293 if (use_utility_process) { 287 if (use_utility_process) {
294 UtilityProcessHost* host = new UtilityProcessHost( 288 UtilityProcessHost* host = new UtilityProcessHost(
295 rdh, this, ChromeThread::UI); 289 rdh, this, ChromeThread::UI);
296 host->StartUpdateManifestParse(xml_); 290 host->StartUpdateManifestParse(xml_);
297 } else { 291 } else {
298 UpdateManifest manifest; 292 UpdateManifest manifest;
299 if (manifest.Parse(xml_)) { 293 if (manifest.Parse(xml_)) {
300 ChromeThread::PostTask( 294 ChromeThread::PostTask(
301 ChromeThread::UI, FROM_HERE, 295 ChromeThread::UI, FROM_HERE,
302 NewRunnableMethod( 296 NewRunnableMethod(
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 extension_fetcher_.reset( 721 extension_fetcher_.reset(
728 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); 722 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this));
729 extension_fetcher_->set_request_context( 723 extension_fetcher_->set_request_context(
730 Profile::GetDefaultRequestContext()); 724 Profile::GetDefaultRequestContext());
731 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 725 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
732 net::LOAD_DO_NOT_SAVE_COOKIES); 726 net::LOAD_DO_NOT_SAVE_COOKIES);
733 extension_fetcher_->Start(); 727 extension_fetcher_->Start();
734 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); 728 current_extension_fetch_ = ExtensionFetch(id, url, hash, version);
735 } 729 }
736 } 730 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/sandboxed_extension_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698