| Index: chrome/browser/extensions/updater/extension_updater.cc
|
| diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
|
| index 6561c750c2659e7a25fb4123d22865a66a95d507..6d6d076c93b64f7d8854f4771a98b3ccfdda39cc 100644
|
| --- a/chrome/browser/extensions/updater/extension_updater.cc
|
| +++ b/chrome/browser/extensions/updater/extension_updater.cc
|
| @@ -190,12 +190,15 @@ ExtensionUpdater::CheckParams::~CheckParams() {}
|
| ExtensionUpdater::FetchedCRXFile::FetchedCRXFile(
|
| const std::string& i,
|
| const base::FilePath& p,
|
| + const std::string& h,
|
| bool file_ownership_passed,
|
| const std::set<int>& request_ids)
|
| : extension_id(i),
|
| path(p),
|
| + hash(h),
|
| file_ownership_passed(file_ownership_passed),
|
| - request_ids(request_ids) {}
|
| + request_ids(request_ids) {
|
| +}
|
|
|
| ExtensionUpdater::FetchedCRXFile::FetchedCRXFile()
|
| : path(), file_ownership_passed(true) {}
|
| @@ -592,6 +595,7 @@ void ExtensionUpdater::OnExtensionDownloadFailed(
|
| void ExtensionUpdater::OnExtensionDownloadFinished(
|
| const std::string& id,
|
| const base::FilePath& path,
|
| + const std::string& hash,
|
| bool file_ownership_passed,
|
| const GURL& download_url,
|
| const std::string& version,
|
| @@ -602,7 +606,7 @@ void ExtensionUpdater::OnExtensionDownloadFinished(
|
|
|
| VLOG(2) << download_url << " written to " << path.value();
|
|
|
| - FetchedCRXFile fetched(id, path, file_ownership_passed, request_ids);
|
| + FetchedCRXFile fetched(id, path, hash, file_ownership_passed, request_ids);
|
| fetched_crx_files_.push(fetched);
|
|
|
| // MaybeInstallCRXFile() removes extensions from |in_progress_ids_| after
|
| @@ -687,10 +691,9 @@ void ExtensionUpdater::MaybeInstallCRXFile() {
|
| // The ExtensionService is now responsible for cleaning up the temp file
|
| // at |crx_file.path|.
|
| CrxInstaller* installer = NULL;
|
| - if (service_->UpdateExtension(crx_file.extension_id,
|
| - crx_file.path,
|
| - crx_file.file_ownership_passed,
|
| - &installer)) {
|
| + if (service_->CheckAndUpdateExtension(
|
| + crx_file.extension_id, crx_file.path, crx_file.hash,
|
| + crx_file.file_ownership_passed, &installer)) {
|
| crx_install_is_running_ = true;
|
| current_crx_file_ = crx_file;
|
|
|
|
|