| 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 EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ | 5 #ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ |
| 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ | 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 // Handles the result of a manifest fetch. | 201 // Handles the result of a manifest fetch. |
| 202 void OnManifestFetchComplete(const GURL& url, | 202 void OnManifestFetchComplete(const GURL& url, |
| 203 const net::URLRequestStatus& status, | 203 const net::URLRequestStatus& status, |
| 204 int response_code, | 204 int response_code, |
| 205 const base::TimeDelta& backoff_delay, | 205 const base::TimeDelta& backoff_delay, |
| 206 const std::string& data); | 206 const std::string& data); |
| 207 | 207 |
| 208 // Once a manifest is parsed, this starts fetches of any relevant crx files. | 208 // Once a manifest is parsed, this starts fetches of any relevant crx files. |
| 209 // If |results| is null, it means something went wrong when parsing it. | 209 // If |results| is null, it means something went wrong when parsing it. |
| 210 void HandleManifestResults(const ManifestFetchData& fetch_data, | 210 void HandleManifestResults(const ManifestFetchData* fetch_data, |
| 211 const UpdateManifest::Results* results); | 211 const UpdateManifest::Results* results); |
| 212 | 212 |
| 213 // Given a list of potential updates, returns the indices of the ones that are | 213 // Given a list of potential updates, returns the indices of the ones that are |
| 214 // applicable (are actually a new version, etc.) in |result|. | 214 // applicable (are actually a new version, etc.) in |result|. |
| 215 void DetermineUpdates(const ManifestFetchData& fetch_data, | 215 void DetermineUpdates(const ManifestFetchData& fetch_data, |
| 216 const UpdateManifest::Results& possible_updates, | 216 const UpdateManifest::Results& possible_updates, |
| 217 std::vector<int>* result); | 217 std::vector<int>* result); |
| 218 | 218 |
| 219 // Begins (or queues up) download of an updated extension. | 219 // Begins (or queues up) download of an updated extension. |
| 220 void FetchUpdatedExtension(scoped_ptr<ExtensionFetch> fetch_data); | 220 void FetchUpdatedExtension(scoped_ptr<ExtensionFetch> fetch_data); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 // Used to create WeakPtrs to |this|. | 326 // Used to create WeakPtrs to |this|. |
| 327 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_; | 327 base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_; |
| 328 | 328 |
| 329 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader); | 329 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloader); |
| 330 }; | 330 }; |
| 331 | 331 |
| 332 } // namespace extensions | 332 } // namespace extensions |
| 333 | 333 |
| 334 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ | 334 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_H_ |
| OLD | NEW |