| OLD | NEW |
| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 // Creates the sandboxed utility process and tells it to start parsing. | 263 // Creates the sandboxed utility process and tells it to start parsing. |
| 264 void ParseInSandbox(ResourceDispatcherHost* rdh) { | 264 void ParseInSandbox(ResourceDispatcherHost* rdh) { |
| 265 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); | 265 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
| 266 | 266 |
| 267 // TODO(asargent) we shouldn't need to do this branch here - instead | 267 // TODO(asargent) we shouldn't need to do this branch here - instead |
| 268 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) | 268 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) |
| 269 bool use_utility_process = rdh && | 269 bool use_utility_process = rdh && |
| 270 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); | 270 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); |
| 271 | 271 |
| 272 #if defined(OS_POSIX) | 272 #if defined(OS_LINUX) |
| 273 // TODO(port): Don't use a utility process on linux (crbug.com/22703) or | 273 // TODO(port): Don't use a utility process on linux (crbug.com/22703). |
| 274 // MacOS (crbug.com/8102) until problems related to autoupdate are fixed. | |
| 275 use_utility_process = false; | 274 use_utility_process = false; |
| 276 #endif | 275 #endif |
| 277 | 276 |
| 278 if (use_utility_process) { | 277 if (use_utility_process) { |
| 279 UtilityProcessHost* host = new UtilityProcessHost( | 278 UtilityProcessHost* host = new UtilityProcessHost( |
| 280 rdh, this, ChromeThread::UI); | 279 rdh, this, ChromeThread::UI); |
| 281 host->StartUpdateManifestParse(xml_); | 280 host->StartUpdateManifestParse(xml_); |
| 282 } else { | 281 } else { |
| 283 UpdateManifest manifest; | 282 UpdateManifest manifest; |
| 284 if (manifest.Parse(xml_)) { | 283 if (manifest.Parse(xml_)) { |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 extension_fetcher_.reset( | 711 extension_fetcher_.reset( |
| 713 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); | 712 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); |
| 714 extension_fetcher_->set_request_context( | 713 extension_fetcher_->set_request_context( |
| 715 Profile::GetDefaultRequestContext()); | 714 Profile::GetDefaultRequestContext()); |
| 716 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | | 715 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | |
| 717 net::LOAD_DO_NOT_SAVE_COOKIES); | 716 net::LOAD_DO_NOT_SAVE_COOKIES); |
| 718 extension_fetcher_->Start(); | 717 extension_fetcher_->Start(); |
| 719 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); | 718 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); |
| 720 } | 719 } |
| 721 } | 720 } |
| OLD | NEW |