| 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 <list> | 8 #include <list> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 base::ThreadChecker thread_checker_; | 70 base::ThreadChecker thread_checker_; |
| 71 | 71 |
| 72 scoped_refptr<Configurator> config_; | 72 scoped_refptr<Configurator> config_; |
| 73 | 73 |
| 74 UpdateChecker::Factory update_checker_factory_; | 74 UpdateChecker::Factory update_checker_factory_; |
| 75 CrxDownloader::Factory crx_downloader_factory_; | 75 CrxDownloader::Factory crx_downloader_factory_; |
| 76 | 76 |
| 77 // TODO(sorin): refactor as a ref counted class. | 77 // TODO(sorin): refactor as a ref counted class. |
| 78 PingManager* ping_manager_; // Not owned by this class. | 78 PingManager* ping_manager_; // Not owned by this class. |
| 79 | 79 |
| 80 scoped_refptr<ComponentMetadata> metadata_; |
| 81 |
| 80 // Called when CRX state changes occur. | 82 // Called when CRX state changes occur. |
| 81 const NotifyObserversCallback notify_observers_callback_; | 83 const NotifyObserversCallback notify_observers_callback_; |
| 82 | 84 |
| 83 // Contains the contexts associated with each update in progress. | 85 // Contains the contexts associated with each update in progress. |
| 84 std::set<UpdateContext*> update_contexts_; | 86 std::set<UpdateContext*> update_contexts_; |
| 85 | 87 |
| 86 // Implements a rate limiting mechanism for background update checks. Has the | 88 // Implements a rate limiting mechanism for background update checks. Has the |
| 87 // effect of rejecting the update call if the update call occurs before | 89 // effect of rejecting the update call if the update call occurs before |
| 88 // a certain time, which is negotiated with the server as part of the | 90 // a certain time, which is negotiated with the server as part of the |
| 89 // update protocol. See the comments for X-Retry-After header. | 91 // update protocol. See the comments for X-Retry-After header. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Contains the ids of the items to update. | 148 // Contains the ids of the items to update. |
| 147 std::queue<std::string> queue; | 149 std::queue<std::string> queue; |
| 148 | 150 |
| 149 // The time in seconds to wait until doing further update checks. | 151 // The time in seconds to wait until doing further update checks. |
| 150 int retry_after_sec_; | 152 int retry_after_sec_; |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 } // namespace update_client | 155 } // namespace update_client |
| 154 | 156 |
| 155 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ | 157 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_ENGINE_H_ |
| OLD | NEW |