OLD | NEW |
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_UPDATE_CLIENT_UPDATE_ENGINE_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ |
6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ |
7 | 7 |
8 #include <iterator> | 8 #include <iterator> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 base::ThreadChecker thread_checker_; | 96 base::ThreadChecker thread_checker_; |
97 | 97 |
98 scoped_refptr<Configurator> config_; | 98 scoped_refptr<Configurator> config_; |
99 | 99 |
100 UpdateChecker::Factory update_checker_factory_; | 100 UpdateChecker::Factory update_checker_factory_; |
101 CrxDownloader::Factory crx_downloader_factory_; | 101 CrxDownloader::Factory crx_downloader_factory_; |
102 | 102 |
103 // TODO(sorin): refactor as a ref counted class. | 103 // TODO(sorin): refactor as a ref counted class. |
104 PingManager* ping_manager_; // Not owned by this class. | 104 PingManager* ping_manager_; // Not owned by this class. |
105 | 105 |
106 std::unique_ptr<PersistedData> metadata_; | |
107 | |
108 // Called when CRX state changes occur. | 106 // Called when CRX state changes occur. |
109 const NotifyObserversCallback notify_observers_callback_; | 107 const NotifyObserversCallback notify_observers_callback_; |
110 | 108 |
111 // Contains the contexts associated with each update in progress. | 109 // Contains the contexts associated with each update in progress. |
112 UpdateContexts update_contexts_; | 110 UpdateContexts update_contexts_; |
113 | 111 |
114 // Implements a rate limiting mechanism for background update checks. Has the | 112 // Implements a rate limiting mechanism for background update checks. Has the |
115 // effect of rejecting the update call if the update call occurs before | 113 // effect of rejecting the update call if the update call occurs before |
116 // a certain time, which is negotiated with the server as part of the | 114 // a certain time, which is negotiated with the server as part of the |
117 // update protocol. See the comments for X-Retry-After header. | 115 // update protocol. See the comments for X-Retry-After header. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // is handling the next component in the queue. | 177 // is handling the next component in the queue. |
180 base::TimeDelta next_update_delay; | 178 base::TimeDelta next_update_delay; |
181 | 179 |
182 private: | 180 private: |
183 DISALLOW_COPY_AND_ASSIGN(UpdateContext); | 181 DISALLOW_COPY_AND_ASSIGN(UpdateContext); |
184 }; | 182 }; |
185 | 183 |
186 } // namespace update_client | 184 } // namespace update_client |
187 | 185 |
188 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ | 186 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ |
OLD | NEW |