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

Side by Side Diff: components/component_updater/component_updater_service.cc

Issue 897873002: Make ComponentInstaller refcounted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@2015_01_19_component_installer
Patch Set: fix Created 5 years, 10 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/component_updater/component_updater_service.h" 5 #include "components/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 Status Stop() override; 101 Status Stop() override;
102 Status RegisterComponent(const CrxComponent& component) override; 102 Status RegisterComponent(const CrxComponent& component) override;
103 std::vector<std::string> GetComponentIDs() const override; 103 std::vector<std::string> GetComponentIDs() const override;
104 OnDemandUpdater& GetOnDemandUpdater() override; 104 OnDemandUpdater& GetOnDemandUpdater() override;
105 void MaybeThrottle(const std::string& crx_id, 105 void MaybeThrottle(const std::string& crx_id,
106 const base::Closure& callback) override; 106 const base::Closure& callback) override;
107 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override; 107 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override;
108 108
109 // Context for a crx download url request. 109 // Context for a crx download url request.
110 struct CRXContext { 110 struct CRXContext {
111 ComponentInstaller* installer; 111 scoped_refptr<ComponentInstaller> installer;
112 std::vector<uint8_t> pk_hash; 112 std::vector<uint8_t> pk_hash;
113 std::string id; 113 std::string id;
114 std::string fingerprint; 114 std::string fingerprint;
115 CRXContext() : installer(NULL) {} 115 CRXContext() : installer(NULL) {}
116 }; 116 };
117 117
118 private: 118 private:
119 enum ErrorCategory { 119 enum ErrorCategory {
120 kErrorNone = 0, 120 kErrorNone = 0,
121 kNetworkError, 121 kNetworkError,
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 /////////////////////////////////////////////////////////////////////////////// 1002 ///////////////////////////////////////////////////////////////////////////////
1003 1003
1004 // The component update factory. Using the component updater as a singleton 1004 // The component update factory. Using the component updater as a singleton
1005 // is the job of the browser process. 1005 // is the job of the browser process.
1006 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config) { 1006 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config) {
1007 DCHECK(config); 1007 DCHECK(config);
1008 return new CrxUpdateService(config); 1008 return new CrxUpdateService(config);
1009 } 1009 }
1010 1010
1011 } // namespace component_updater 1011 } // namespace component_updater
OLDNEW
« no previous file with comments | « chrome/browser/net/crl_set_fetcher.h ('k') | components/component_updater/default_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698