diff options
author | ginkage <ginkage@chromium.org> | 2015-02-04 04:39:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 12:40:13 +0000 |
commit | 553af32002b282cf9bdd823e475f5646e1ab7182 (patch) | |
tree | 562ba6ee8b81d756c9385cc866989df913f170f5 /extensions/browser/updater | |
parent | 6ef9302baebb894ced09f28741f86bbb626ed82a (diff) | |
download | chromium_src-553af32002b282cf9bdd823e475f5646e1ab7182.zip chromium_src-553af32002b282cf9bdd823e475f5646e1ab7182.tar.gz chromium_src-553af32002b282cf9bdd823e475f5646e1ab7182.tar.bz2 |
Validate hash_sha256 checksum on .crx update.
BUG=338837
Review URL: https://codereview.chromium.org/829583002
Cr-Commit-Position: refs/heads/master@{#314547}
Diffstat (limited to 'extensions/browser/updater')
4 files changed, 8 insertions, 13 deletions
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc index da4ff41..3e06083 100644 --- a/extensions/browser/updater/extension_downloader.cc +++ b/extensions/browser/updater/extension_downloader.cc @@ -731,13 +731,10 @@ void ExtensionDownloader::NotifyDelegateDownloadFinished( scoped_ptr<ExtensionFetch> fetch_data, const base::FilePath& crx_path, bool file_ownership_passed) { - delegate_->OnExtensionDownloadFinished(fetch_data->id, - crx_path, - file_ownership_passed, - fetch_data->url, - fetch_data->version, - ping_results_[fetch_data->id], - fetch_data->request_ids); + delegate_->OnExtensionDownloadFinished( + CRXFileInfo(fetch_data->id, crx_path, fetch_data->package_hash), + file_ownership_passed, fetch_data->url, fetch_data->version, + ping_results_[fetch_data->id], fetch_data->request_ids); ping_results_.erase(fetch_data->id); } diff --git a/extensions/browser/updater/extension_downloader_delegate.h b/extensions/browser/updater/extension_downloader_delegate.h index aed6885..2e5eaa5 100644 --- a/extensions/browser/updater/extension_downloader_delegate.h +++ b/extensions/browser/updater/extension_downloader_delegate.h @@ -9,6 +9,7 @@ #include <string> #include "base/time/time.h" +#include "extensions/browser/crx_file_info.h" #include "extensions/browser/updater/manifest_fetch_data.h" class GURL; @@ -82,8 +83,7 @@ class ExtensionDownloaderDelegate { // successfully downloaded to |path|. |ownership_passed| is true if delegate // should get ownership of the file. virtual void OnExtensionDownloadFinished( - const std::string& id, - const base::FilePath& path, + const CRXFileInfo& file, bool file_ownership_passed, const GURL& download_url, const std::string& version, diff --git a/extensions/browser/updater/update_service.cc b/extensions/browser/updater/update_service.cc index ece627a..10a86c3 100644 --- a/extensions/browser/updater/update_service.cc +++ b/extensions/browser/updater/update_service.cc @@ -53,8 +53,7 @@ void UpdateService::OnExtensionDownloadFailed( } void UpdateService::OnExtensionDownloadFinished( - const std::string& id, - const base::FilePath& path, + const CRXFileInfo& file, bool file_ownership_passed, const GURL& download_url, const std::string& version, diff --git a/extensions/browser/updater/update_service.h b/extensions/browser/updater/update_service.h index 008917d..2f4cd80 100644 --- a/extensions/browser/updater/update_service.h +++ b/extensions/browser/updater/update_service.h @@ -48,8 +48,7 @@ class UpdateService : public KeyedService, public ExtensionDownloaderDelegate { Error error, const PingResult& ping, const std::set<int>& request_ids) override; - void OnExtensionDownloadFinished(const std::string& id, - const base::FilePath& path, + void OnExtensionDownloadFinished(const CRXFileInfo& file, bool file_ownership_passed, const GURL& download_url, const std::string& version, |