| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void TimerFired(); | 185 void TimerFired(); |
| 186 | 186 |
| 187 // Posted by CheckSoon(). | 187 // Posted by CheckSoon(). |
| 188 void DoCheckSoon(); | 188 void DoCheckSoon(); |
| 189 | 189 |
| 190 // Implementation of ExtensionDownloaderDelegate. | 190 // Implementation of ExtensionDownloaderDelegate. |
| 191 virtual void OnExtensionDownloadFailed( | 191 virtual void OnExtensionDownloadFailed( |
| 192 const std::string& id, | 192 const std::string& id, |
| 193 Error error, | 193 Error error, |
| 194 const PingResult& ping, | 194 const PingResult& ping, |
| 195 const std::set<int>& request_ids) OVERRIDE; | 195 const std::set<int>& request_ids) override; |
| 196 virtual void OnExtensionDownloadFinished( | 196 virtual void OnExtensionDownloadFinished( |
| 197 const std::string& id, | 197 const std::string& id, |
| 198 const base::FilePath& path, | 198 const base::FilePath& path, |
| 199 bool file_ownership_passed, | 199 bool file_ownership_passed, |
| 200 const GURL& download_url, | 200 const GURL& download_url, |
| 201 const std::string& version, | 201 const std::string& version, |
| 202 const PingResult& ping, | 202 const PingResult& ping, |
| 203 const std::set<int>& request_id) OVERRIDE; | 203 const std::set<int>& request_id) override; |
| 204 virtual bool GetPingDataForExtension( | 204 virtual bool GetPingDataForExtension( |
| 205 const std::string& id, | 205 const std::string& id, |
| 206 ManifestFetchData::PingData* ping_data) OVERRIDE; | 206 ManifestFetchData::PingData* ping_data) override; |
| 207 virtual std::string GetUpdateUrlData(const std::string& id) OVERRIDE; | 207 virtual std::string GetUpdateUrlData(const std::string& id) override; |
| 208 virtual bool IsExtensionPending(const std::string& id) OVERRIDE; | 208 virtual bool IsExtensionPending(const std::string& id) override; |
| 209 virtual bool GetExtensionExistingVersion(const std::string& id, | 209 virtual bool GetExtensionExistingVersion(const std::string& id, |
| 210 std::string* version) OVERRIDE; | 210 std::string* version) override; |
| 211 virtual bool ShouldForceUpdate(const std::string& extension_id, | 211 virtual bool ShouldForceUpdate(const std::string& extension_id, |
| 212 std::string* source) OVERRIDE; | 212 std::string* source) override; |
| 213 | 213 |
| 214 void UpdatePingData(const std::string& id, const PingResult& ping_result); | 214 void UpdatePingData(const std::string& id, const PingResult& ping_result); |
| 215 | 215 |
| 216 // Starts installing a crx file that has been fetched but not installed yet. | 216 // Starts installing a crx file that has been fetched but not installed yet. |
| 217 void MaybeInstallCRXFile(); | 217 void MaybeInstallCRXFile(); |
| 218 | 218 |
| 219 // content::NotificationObserver implementation. | 219 // content::NotificationObserver implementation. |
| 220 virtual void Observe(int type, | 220 virtual void Observe(int type, |
| 221 const content::NotificationSource& source, | 221 const content::NotificationSource& source, |
| 222 const content::NotificationDetails& details) OVERRIDE; | 222 const content::NotificationDetails& details) override; |
| 223 | 223 |
| 224 // Implementation of ExtensionRegistryObserver. | 224 // Implementation of ExtensionRegistryObserver. |
| 225 virtual void OnExtensionWillBeInstalled( | 225 virtual void OnExtensionWillBeInstalled( |
| 226 content::BrowserContext* browser_context, | 226 content::BrowserContext* browser_context, |
| 227 const Extension* extension, | 227 const Extension* extension, |
| 228 bool is_update, | 228 bool is_update, |
| 229 bool from_ephemeral, | 229 bool from_ephemeral, |
| 230 const std::string& old_name) OVERRIDE; | 230 const std::string& old_name) override; |
| 231 | 231 |
| 232 // Send a notification that update checks are starting. | 232 // Send a notification that update checks are starting. |
| 233 void NotifyStarted(); | 233 void NotifyStarted(); |
| 234 | 234 |
| 235 // Send a notification if we're finished updating. | 235 // Send a notification if we're finished updating. |
| 236 void NotifyIfFinished(int request_id); | 236 void NotifyIfFinished(int request_id); |
| 237 | 237 |
| 238 void ExtensionCheckFinished(const std::string& extension_id, | 238 void ExtensionCheckFinished(const std::string& extension_id, |
| 239 const FinishedCallback& callback); | 239 const FinishedCallback& callback); |
| 240 | 240 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 std::set<std::string> forced_updates_; | 289 std::set<std::string> forced_updates_; |
| 290 | 290 |
| 291 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; | 291 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; |
| 292 | 292 |
| 293 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); | 293 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 } // namespace extensions | 296 } // namespace extensions |
| 297 | 297 |
| 298 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 298 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
| OLD | NEW |