OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSION_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UPDATER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UPDATER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UPDATER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 // Does common work from constructors. | 198 // Does common work from constructors. |
199 void Init(); | 199 void Init(); |
200 | 200 |
201 // Computes when to schedule the first update check. | 201 // Computes when to schedule the first update check. |
202 base::TimeDelta DetermineFirstCheckDelay(); | 202 base::TimeDelta DetermineFirstCheckDelay(); |
203 | 203 |
204 // URLFetcher::Delegate interface. | 204 // URLFetcher::Delegate interface. |
205 virtual void OnURLFetchComplete(const URLFetcher* source, | 205 virtual void OnURLFetchComplete(const URLFetcher* source, |
206 const GURL& url, | 206 const GURL& url, |
207 const URLRequestStatus& status, | 207 const net::URLRequestStatus& status, |
208 int response_code, | 208 int response_code, |
209 const ResponseCookies& cookies, | 209 const ResponseCookies& cookies, |
210 const std::string& data); | 210 const std::string& data); |
211 | 211 |
212 // These do the actual work when a URL fetch completes. | 212 // These do the actual work when a URL fetch completes. |
213 virtual void OnManifestFetchComplete(const GURL& url, | 213 virtual void OnManifestFetchComplete(const GURL& url, |
214 const URLRequestStatus& status, | 214 const net::URLRequestStatus& status, |
215 int response_code, | 215 int response_code, |
216 const std::string& data); | 216 const std::string& data); |
217 virtual void OnCRXFetchComplete(const GURL& url, | 217 virtual void OnCRXFetchComplete(const GURL& url, |
218 const URLRequestStatus& status, | 218 const net::URLRequestStatus& status, |
219 int response_code, | 219 int response_code, |
220 const std::string& data); | 220 const std::string& data); |
221 | 221 |
222 // Called when a crx file has been written into a temp file, and is ready | 222 // Called when a crx file has been written into a temp file, and is ready |
223 // to be installed. | 223 // to be installed. |
224 void OnCRXFileWritten(const std::string& id, const FilePath& path, | 224 void OnCRXFileWritten(const std::string& id, const FilePath& path, |
225 const GURL& download_url); | 225 const GURL& download_url); |
226 | 226 |
227 // Verifies downloaded blacklist. Based on the blacklist, calls extension | 227 // Verifies downloaded blacklist. Based on the blacklist, calls extension |
228 // service to unload blacklisted extensions and update pref. | 228 // service to unload blacklisted extensions and update pref. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 scoped_refptr<ExtensionUpdaterFileHandler> file_handler_; | 286 scoped_refptr<ExtensionUpdaterFileHandler> file_handler_; |
287 bool blacklist_checks_enabled_; | 287 bool blacklist_checks_enabled_; |
288 | 288 |
289 FRIEND_TEST(ExtensionUpdaterTest, TestStartUpdateCheckMemory); | 289 FRIEND_TEST(ExtensionUpdaterTest, TestStartUpdateCheckMemory); |
290 FRIEND_TEST(ExtensionUpdaterTest, TestAfterStopBehavior); | 290 FRIEND_TEST(ExtensionUpdaterTest, TestAfterStopBehavior); |
291 | 291 |
292 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); | 292 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); |
293 }; | 293 }; |
294 | 294 |
295 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UPDATER_H_ | 295 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UPDATER_H_ |
OLD | NEW |