| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/component_updater/component_updater_service.h" | 5 #include "chrome/browser/component_updater/component_updater_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 void CrxUpdateService::ParseManifest(const std::string& xml) { | 699 void CrxUpdateService::ParseManifest(const std::string& xml) { |
| 700 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 700 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 701 if (config_->InProcess()) { | 701 if (config_->InProcess()) { |
| 702 UpdateManifest manifest; | 702 UpdateManifest manifest; |
| 703 if (!manifest.Parse(xml)) { | 703 if (!manifest.Parse(xml)) { |
| 704 CrxUpdateService::OnParseUpdateManifestFailed(manifest.errors()); | 704 CrxUpdateService::OnParseUpdateManifestFailed(manifest.errors()); |
| 705 } else { | 705 } else { |
| 706 CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results()); | 706 CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results()); |
| 707 } | 707 } |
| 708 } else { | 708 } else { |
| 709 UtilityProcessHost* host = UtilityProcessHost::Create( | 709 UtilityProcessHost* host = |
| 710 new ManifestParserBridge(this), | 710 UtilityProcessHost::Create(new ManifestParserBridge(this), |
| 711 base::MessageLoopProxy::current()); | 711 base::MessageLoopProxy::current().get()); |
| 712 host->EnableZygote(); | 712 host->EnableZygote(); |
| 713 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml)); | 713 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml)); |
| 714 } | 714 } |
| 715 } | 715 } |
| 716 | 716 |
| 717 // A valid Omaha update check has arrived, from only the list of components that | 717 // A valid Omaha update check has arrived, from only the list of components that |
| 718 // we are currently upgrading we check for a match in which the server side | 718 // we are currently upgrading we check for a match in which the server side |
| 719 // version is newer, if so we queue them for an upgrade. The next time we call | 719 // version is newer, if so we queue them for an upgrade. The next time we call |
| 720 // ProcessPendingItems() one of them will be drafted for the upgrade process. | 720 // ProcessPendingItems() one of them will be drafted for the upgrade process. |
| 721 void CrxUpdateService::OnParseUpdateManifestSucceeded( | 721 void CrxUpdateService::OnParseUpdateManifestSucceeded( |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 ScheduleNextRun(false); | 873 ScheduleNextRun(false); |
| 874 } | 874 } |
| 875 | 875 |
| 876 // The component update factory. Using the component updater as a singleton | 876 // The component update factory. Using the component updater as a singleton |
| 877 // is the job of the browser process. | 877 // is the job of the browser process. |
| 878 ComponentUpdateService* ComponentUpdateServiceFactory( | 878 ComponentUpdateService* ComponentUpdateServiceFactory( |
| 879 ComponentUpdateService::Configurator* config) { | 879 ComponentUpdateService::Configurator* config) { |
| 880 DCHECK(config); | 880 DCHECK(config); |
| 881 return new CrxUpdateService(config); | 881 return new CrxUpdateService(config); |
| 882 } | 882 } |
| OLD | NEW |