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

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

Issue 256036: Do not use the utility process on linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 NewRunnableMethod(this, &SafeManifestParser::ParseInSandbox, 240 NewRunnableMethod(this, &SafeManifestParser::ParseInSandbox,
241 g_browser_process->resource_dispatcher_host())); 241 g_browser_process->resource_dispatcher_host()));
242 } 242 }
243 243
244 // Creates the sandboxed utility process and tells it to start parsing. 244 // Creates the sandboxed utility process and tells it to start parsing.
245 void ParseInSandbox(ResourceDispatcherHost* rdh) { 245 void ParseInSandbox(ResourceDispatcherHost* rdh) {
246 DCHECK(MessageLoop::current() == io_loop_); 246 DCHECK(MessageLoop::current() == io_loop_);
247 247
248 // TODO(asargent) we shouldn't need to do this branch here - instead 248 // TODO(asargent) we shouldn't need to do this branch here - instead
249 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) 249 // UtilityProcessHost should handle it for us. (http://crbug.com/19192)
250 if (rdh && !CommandLine::ForCurrentProcess()->HasSwitch( 250 bool use_utility_process = rdh &&
251 switches::kSingleProcess)) { 251 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
252
253 #if defined(OS_POSIX)
254 // TODO(port): Don't use a utility process on linux (crbug.com/22703) or
255 // MacOS (crbug.com/8102) until problems related to autoupdate are fixed.
256 use_utility_process = false;
257 #endif
258
259 if (use_utility_process) {
252 UtilityProcessHost* host = new UtilityProcessHost( 260 UtilityProcessHost* host = new UtilityProcessHost(
253 rdh, this, updater_loop_); 261 rdh, this, updater_loop_);
254 host->StartUpdateManifestParse(xml_); 262 host->StartUpdateManifestParse(xml_);
255 } else { 263 } else {
256 UpdateManifest manifest; 264 UpdateManifest manifest;
257 if (manifest.Parse(xml_)) { 265 if (manifest.Parse(xml_)) {
258 updater_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, 266 updater_loop_->PostTask(FROM_HERE, NewRunnableMethod(this,
259 &SafeManifestParser::OnParseUpdateManifestSucceeded, 267 &SafeManifestParser::OnParseUpdateManifestSucceeded,
260 manifest.results())); 268 manifest.results()));
261 } else { 269 } else {
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 extension_fetcher_.reset( 635 extension_fetcher_.reset(
628 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); 636 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this));
629 extension_fetcher_->set_request_context( 637 extension_fetcher_->set_request_context(
630 Profile::GetDefaultRequestContext()); 638 Profile::GetDefaultRequestContext());
631 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 639 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
632 net::LOAD_DO_NOT_SAVE_COOKIES); 640 net::LOAD_DO_NOT_SAVE_COOKIES);
633 extension_fetcher_->Start(); 641 extension_fetcher_->Start();
634 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); 642 current_extension_fetch_ = ExtensionFetch(id, url, hash, version);
635 } 643 }
636 } 644 }
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