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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 if (config_->InProcess()) { | 763 if (config_->InProcess()) { |
764 UpdateManifest manifest; | 764 UpdateManifest manifest; |
765 if (!manifest.Parse(xml)) | 765 if (!manifest.Parse(xml)) |
766 CrxUpdateService::OnParseUpdateManifestFailed(manifest.errors()); | 766 CrxUpdateService::OnParseUpdateManifestFailed(manifest.errors()); |
767 else | 767 else |
768 CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results()); | 768 CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results()); |
769 } else { | 769 } else { |
770 UtilityProcessHost* host = | 770 UtilityProcessHost* host = |
771 UtilityProcessHost::Create(new ManifestParserBridge(this), | 771 UtilityProcessHost::Create(new ManifestParserBridge(this), |
772 base::MessageLoopProxy::current().get()); | 772 base::MessageLoopProxy::current().get()); |
773 host->EnableZygote(); | |
774 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml)); | 773 host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml)); |
775 } | 774 } |
776 } | 775 } |
777 | 776 |
778 // A valid Omaha update check has arrived, from only the list of components that | 777 // A valid Omaha update check has arrived, from only the list of components that |
779 // we are currently upgrading we check for a match in which the server side | 778 // we are currently upgrading we check for a match in which the server side |
780 // version is newer, if so we queue them for an upgrade. The next time we call | 779 // version is newer, if so we queue them for an upgrade. The next time we call |
781 // ProcessPendingItems() one of them will be drafted for the upgrade process. | 780 // ProcessPendingItems() one of them will be drafted for the upgrade process. |
782 void CrxUpdateService::OnParseUpdateManifestSucceeded( | 781 void CrxUpdateService::OnParseUpdateManifestSucceeded( |
783 const UpdateManifest::Results& results) { | 782 const UpdateManifest::Results& results) { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 } | 1000 } |
1002 } | 1001 } |
1003 | 1002 |
1004 // The component update factory. Using the component updater as a singleton | 1003 // The component update factory. Using the component updater as a singleton |
1005 // is the job of the browser process. | 1004 // is the job of the browser process. |
1006 ComponentUpdateService* ComponentUpdateServiceFactory( | 1005 ComponentUpdateService* ComponentUpdateServiceFactory( |
1007 ComponentUpdateService::Configurator* config) { | 1006 ComponentUpdateService::Configurator* config) { |
1008 DCHECK(config); | 1007 DCHECK(config); |
1009 return new CrxUpdateService(config); | 1008 return new CrxUpdateService(config); |
1010 } | 1009 } |
OLD | NEW |