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 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // hasn't been performed yet. This is used mostly by tests; calling | 118 // hasn't been performed yet. This is used mostly by tests; calling |
119 // code should just call CheckSoon(). | 119 // code should just call CheckSoon(). |
120 bool WillCheckSoon() const; | 120 bool WillCheckSoon() const; |
121 | 121 |
122 // Changes the params that are used for the automatic periodic update checks, | 122 // Changes the params that are used for the automatic periodic update checks, |
123 // as well as for explicit calls to CheckSoon. | 123 // as well as for explicit calls to CheckSoon. |
124 void set_default_check_params(const CheckParams& params) { | 124 void set_default_check_params(const CheckParams& params) { |
125 default_params_ = params; | 125 default_params_ = params; |
126 } | 126 } |
127 | 127 |
128 // Overrides the extension cache with |extension_cache| for testing. | |
129 void SetExtensionCacheForTesting(ExtensionCache* extension_cache); | |
130 | |
131 private: | 128 private: |
132 friend class ExtensionUpdaterTest; | 129 friend class ExtensionUpdaterTest; |
133 friend class ExtensionUpdaterFileHandler; | 130 friend class ExtensionUpdaterFileHandler; |
134 | 131 |
135 // FetchedCRXFile holds information about a CRX file we fetched to disk, | 132 // FetchedCRXFile holds information about a CRX file we fetched to disk, |
136 // but have not yet installed. | 133 // but have not yet installed. |
137 struct FetchedCRXFile { | 134 struct FetchedCRXFile { |
138 FetchedCRXFile(); | 135 FetchedCRXFile(); |
139 FetchedCRXFile(const std::string& id, | 136 FetchedCRXFile(const std::string& id, |
140 const base::FilePath& path, | 137 const base::FilePath& path, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 std::set<std::string> forced_updates_; | 289 std::set<std::string> forced_updates_; |
293 | 290 |
294 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; | 291 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; |
295 | 292 |
296 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); | 293 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); |
297 }; | 294 }; |
298 | 295 |
299 } // namespace extensions | 296 } // namespace extensions |
300 | 297 |
301 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 298 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
OLD | NEW |