| 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 |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "extensions/browser/crx_file_info.h" |
| 12 #include "extensions/browser/updater/manifest_fetch_data.h" | 13 #include "extensions/browser/updater/manifest_fetch_data.h" |
| 13 | 14 |
| 14 class GURL; | 15 class GURL; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class FilePath; | 18 class FilePath; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace extensions { | 21 namespace extensions { |
| 21 | 22 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // failure reason. | 76 // failure reason. |
| 76 virtual void OnExtensionDownloadFailed(const std::string& id, | 77 virtual void OnExtensionDownloadFailed(const std::string& id, |
| 77 Error error, | 78 Error error, |
| 78 const PingResult& ping_result, | 79 const PingResult& ping_result, |
| 79 const std::set<int>& request_ids); | 80 const std::set<int>& request_ids); |
| 80 | 81 |
| 81 // Invoked if the extension had an update available and its crx was | 82 // Invoked if the extension had an update available and its crx was |
| 82 // successfully downloaded to |path|. |ownership_passed| is true if delegate | 83 // successfully downloaded to |path|. |ownership_passed| is true if delegate |
| 83 // should get ownership of the file. | 84 // should get ownership of the file. |
| 84 virtual void OnExtensionDownloadFinished( | 85 virtual void OnExtensionDownloadFinished( |
| 85 const std::string& id, | 86 const CRXFileInfo& file, |
| 86 const base::FilePath& path, | |
| 87 bool file_ownership_passed, | 87 bool file_ownership_passed, |
| 88 const GURL& download_url, | 88 const GURL& download_url, |
| 89 const std::string& version, | 89 const std::string& version, |
| 90 const PingResult& ping_result, | 90 const PingResult& ping_result, |
| 91 const std::set<int>& request_ids) = 0; | 91 const std::set<int>& request_ids) = 0; |
| 92 | 92 |
| 93 // The remaining methods are used by the ExtensionDownloader to retrieve | 93 // The remaining methods are used by the ExtensionDownloader to retrieve |
| 94 // information about extensions from the delegate. | 94 // information about extensions from the delegate. |
| 95 | 95 |
| 96 // Invoked to fill the PingData for the given extension id. Returns false | 96 // 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) | 115 // 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 | 116 // 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 | 117 // in |installsource| as part of the update query parameters). The default |
| 118 // implementation always returns |false|. | 118 // implementation always returns |false|. |
| 119 virtual bool ShouldForceUpdate(const std::string& id, std::string* source); | 119 virtual bool ShouldForceUpdate(const std::string& id, std::string* source); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace extensions | 122 } // namespace extensions |
| 123 | 123 |
| 124 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ | 124 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ |
| OLD | NEW |