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

Side by Side Diff: components/component_updater/component_updater_service_internal.h

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull && gclient sync Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_ 5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_ 6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 CrxUpdateService(const scoped_refptr<Configurator>& config, 36 CrxUpdateService(const scoped_refptr<Configurator>& config,
37 const scoped_refptr<UpdateClient>& update_client); 37 const scoped_refptr<UpdateClient>& update_client);
38 ~CrxUpdateService() override; 38 ~CrxUpdateService() override;
39 39
40 // Overrides for ComponentUpdateService. 40 // Overrides for ComponentUpdateService.
41 void AddObserver(Observer* observer) override; 41 void AddObserver(Observer* observer) override;
42 void RemoveObserver(Observer* observer) override; 42 void RemoveObserver(Observer* observer) override;
43 bool RegisterComponent(const CrxComponent& component) override; 43 bool RegisterComponent(const CrxComponent& component) override;
44 bool UnregisterComponent(const std::string& id) override; 44 bool UnregisterComponent(const std::string& id) override;
45 std::vector<std::string> GetComponentIDs() const override; 45 std::vector<std::string> GetComponentIDs() const override;
46 std::unique_ptr<ComponentInfo> GetComponentForMimeType(
47 const std::string& id) const override;
46 OnDemandUpdater& GetOnDemandUpdater() override; 48 OnDemandUpdater& GetOnDemandUpdater() override;
47 void MaybeThrottle(const std::string& id, 49 void MaybeThrottle(const std::string& id,
48 const base::Closure& callback) override; 50 const base::Closure& callback) override;
49 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override; 51 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override;
50 bool GetComponentDetails(const std::string& id, 52 bool GetComponentDetails(const std::string& id,
51 CrxUpdateItem* item) const override; 53 CrxUpdateItem* item) const override;
52 54
53 // Overrides for Observer. 55 // Overrides for Observer.
54 void OnEvent(Events event, const std::string& id) override; 56 void OnEvent(Events event, const std::string& id) override;
55 57
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 std::vector<std::string> components_pending_unregistration_; 102 std::vector<std::string> components_pending_unregistration_;
101 103
102 // Contains the active resource throttles associated with a given component. 104 // Contains the active resource throttles associated with a given component.
103 using ResourceThrottleCallbacks = std::multimap<std::string, base::Closure>; 105 using ResourceThrottleCallbacks = std::multimap<std::string, base::Closure>;
104 ResourceThrottleCallbacks ready_callbacks_; 106 ResourceThrottleCallbacks ready_callbacks_;
105 107
106 // Contains the state of the component. 108 // Contains the state of the component.
107 using ComponentStates = std::map<std::string, CrxUpdateItem>; 109 using ComponentStates = std::map<std::string, CrxUpdateItem>;
108 ComponentStates component_states_; 110 ComponentStates component_states_;
109 111
112 // Contains a map of media types to the component that implements a handler
113 // for that media type. Only the most recently-registered component is
114 // tracked. May include the IDs of un-registered components.
115 std::map<std::string, std::string> component_ids_by_mime_type_;
116
110 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 117 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
111 118
112 DISALLOW_COPY_AND_ASSIGN(CrxUpdateService); 119 DISALLOW_COPY_AND_ASSIGN(CrxUpdateService);
113 }; 120 };
114 121
115 } // namespace component_updater 122 } // namespace component_updater
116 123
117 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_ 124 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_INTERNAL_H_
OLDNEW
« no previous file with comments | « components/component_updater/component_updater_service.cc ('k') | components/component_updater/default_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698