| OLD | NEW |
| 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 Loading... |
| 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 host->set_use_linux_zygote(true); |
| 653 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_)); | 654 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_)); |
| 654 } else { | 655 } else { |
| 655 UpdateManifest manifest; | 656 UpdateManifest manifest; |
| 656 if (manifest.Parse(xml_)) { | 657 if (manifest.Parse(xml_)) { |
| 657 if (!BrowserThread::PostTask( | 658 if (!BrowserThread::PostTask( |
| 658 BrowserThread::UI, FROM_HERE, | 659 BrowserThread::UI, FROM_HERE, |
| 659 base::Bind( | 660 base::Bind( |
| 660 &SafeManifestParser::OnParseUpdateManifestSucceeded, this, | 661 &SafeManifestParser::OnParseUpdateManifestSucceeded, this, |
| 661 manifest.results()))) { | 662 manifest.results()))) { |
| 662 NOTREACHED(); | 663 NOTREACHED(); |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 std::set<std::string>::const_iterator i; | 1245 std::set<std::string>::const_iterator i; |
| 1245 for (i = ids.begin(); i != ids.end(); ++i) | 1246 for (i = ids.begin(); i != ids.end(); ++i) |
| 1246 in_progress_ids_.insert(*i); | 1247 in_progress_ids_.insert(*i); |
| 1247 } | 1248 } |
| 1248 | 1249 |
| 1249 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) { | 1250 void ExtensionUpdater::RemoveFromInProgress(const std::set<std::string>& ids) { |
| 1250 std::set<std::string>::const_iterator i; | 1251 std::set<std::string>::const_iterator i; |
| 1251 for (i = ids.begin(); i != ids.end(); ++i) | 1252 for (i = ids.begin(); i != ids.end(); ++i) |
| 1252 in_progress_ids_.erase(*i); | 1253 in_progress_ids_.erase(*i); |
| 1253 } | 1254 } |
| OLD | NEW |