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

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

Issue 8770025: Zygote most of the uses of the utility process on Linux (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bind.h" 10 #include "base/bind.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 void ParseInSandbox(ResourceDispatcherHost* rdh) { 643 void ParseInSandbox(ResourceDispatcherHost* rdh) {
644 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 644 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
645 645
646 // TODO(asargent) we shouldn't need to do this branch here - instead 646 // TODO(asargent) we shouldn't need to do this branch here - instead
647 // UtilityProcessHost should handle it for us. (http://crbug.com/19192) 647 // UtilityProcessHost should handle it for us. (http://crbug.com/19192)
648 bool use_utility_process = rdh && 648 bool use_utility_process = rdh &&
649 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); 649 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
650 if (use_utility_process) { 650 if (use_utility_process) {
651 UtilityProcessHost* host = new UtilityProcessHost( 651 UtilityProcessHost* host = new UtilityProcessHost(
652 this, BrowserThread::UI); 652 this, BrowserThread::UI);
653 #if defined(OS_LINUX)
654 host->set_should_use_zygote(true);
655 #endif
653 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_)); 656 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_));
654 } else { 657 } else {
655 UpdateManifest manifest; 658 UpdateManifest manifest;
656 if (manifest.Parse(xml_)) { 659 if (manifest.Parse(xml_)) {
657 if (!BrowserThread::PostTask( 660 if (!BrowserThread::PostTask(
658 BrowserThread::UI, FROM_HERE, 661 BrowserThread::UI, FROM_HERE,
659 base::Bind( 662 base::Bind(
660 &SafeManifestParser::OnParseUpdateManifestSucceeded, this, 663 &SafeManifestParser::OnParseUpdateManifestSucceeded, this,
661 manifest.results()))) { 664 manifest.results()))) {
662 NOTREACHED(); 665 NOTREACHED();
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 std::set<std::string>::const_iterator i; 1247 std::set<std::string>::const_iterator i;
1245 for (i = ids.begin(); i != ids.end(); ++i) 1248 for (i = ids.begin(); i != ids.end(); ++i)
1246 in_progress_ids_.insert(*i); 1249 in_progress_ids_.insert(*i);
1247 } 1250 }
1248 1251
1249 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) { 1252 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) {
1250 std::set<std::string>::const_iterator i; 1253 std::set<std::string>::const_iterator i;
1251 for (i = ids.begin(); i != ids.end(); ++i) 1254 for (i = ids.begin(); i != ids.end(); ++i)
1252 in_progress_ids_.erase(*i); 1255 in_progress_ids_.erase(*i);
1253 } 1256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698