| 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_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 Error error, | 77 Error error, |
| 78 const PingResult& ping_result, | 78 const PingResult& ping_result, |
| 79 const std::set<int>& request_ids); | 79 const std::set<int>& request_ids); |
| 80 | 80 |
| 81 // Invoked if the extension had an update available and its crx was | 81 // Invoked if the extension had an update available and its crx was |
| 82 // successfully downloaded to |path|. |ownership_passed| is true if delegate | 82 // successfully downloaded to |path|. |ownership_passed| is true if delegate |
| 83 // should get ownership of the file. | 83 // should get ownership of the file. |
| 84 virtual void OnExtensionDownloadFinished( | 84 virtual void OnExtensionDownloadFinished( |
| 85 const std::string& id, | 85 const std::string& id, |
| 86 const base::FilePath& path, | 86 const base::FilePath& path, |
| 87 const std::string& hash, |
| 87 bool file_ownership_passed, | 88 bool file_ownership_passed, |
| 88 const GURL& download_url, | 89 const GURL& download_url, |
| 89 const std::string& version, | 90 const std::string& version, |
| 90 const PingResult& ping_result, | 91 const PingResult& ping_result, |
| 91 const std::set<int>& request_ids) = 0; | 92 const std::set<int>& request_ids) = 0; |
| 92 | 93 |
| 93 // The remaining methods are used by the ExtensionDownloader to retrieve | 94 // The remaining methods are used by the ExtensionDownloader to retrieve |
| 94 // information about extensions from the delegate. | 95 // information about extensions from the delegate. |
| 95 | 96 |
| 96 // Invoked to fill the PingData for the given extension id. Returns false | 97 // Invoked to fill the PingData for the given extension id. Returns false |
| (...skipping 18 matching lines...) Expand all Loading... |
| 115 // Determines if a given extension should be forced to update and (if so) | 116 // Determines if a given extension should be forced to update and (if so) |
| 116 // what the source of this forcing is (i.e. what string will be passed | 117 // what the source of this forcing is (i.e. what string will be passed |
| 117 // in |installsource| as part of the update query parameters). The default | 118 // in |installsource| as part of the update query parameters). The default |
| 118 // implementation always returns |false|. | 119 // implementation always returns |false|. |
| 119 virtual bool ShouldForceUpdate(const std::string& id, std::string* source); | 120 virtual bool ShouldForceUpdate(const std::string& id, std::string* source); |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 } // namespace extensions | 123 } // namespace extensions |
| 123 | 124 |
| 124 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ | 125 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ |
| OLD | NEW |