Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: chrome/browser/extensions/crx_installer.cc

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add histogram description. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 788567e97933afcdfb806a66d5dd9ce025130a38..635c5d4906ab941dc5ccb5ab921b19aca74d18eb 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -170,6 +170,11 @@ CrxInstaller::~CrxInstaller() {
}
void CrxInstaller::InstallCrx(const base::FilePath& source_file) {
+ CheckAndInstallCrx(source_file, std::string());
+}
+
+void CrxInstaller::CheckAndInstallCrx(const base::FilePath& source_file,
+ const std::string& package_hash) {
ExtensionService* service = service_weak_.get();
if (!service || service->browser_terminating())
return;
@@ -178,13 +183,9 @@ void CrxInstaller::InstallCrx(const base::FilePath& source_file) {
source_file_ = source_file;
- scoped_refptr<SandboxedUnpacker> unpacker(
- new SandboxedUnpacker(source_file,
- install_source_,
- creation_flags_,
- install_directory_,
- installer_task_runner_.get(),
- this));
+ scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker(
+ source_file, package_hash, install_source_, creation_flags_,
+ install_directory_, installer_task_runner_.get(), this));
if (!installer_task_runner_->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698