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

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

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest build for windows. Created 5 years, 11 months 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/startup_helper.cc
diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc
index a69f73d7c4c56b3ea943378686de3722289c75d8..b00df110bf01b6344b2a6939060c7ec62f339234 100644
--- a/chrome/browser/extensions/startup_helper.cc
+++ b/chrome/browser/extensions/startup_helper.cc
@@ -120,11 +120,14 @@ namespace {
class ValidateCrxHelper : public SandboxedUnpackerClient {
public:
- ValidateCrxHelper(const base::FilePath& crx_file,
+ ValidateCrxHelper(const CRXFileInfo& file,
const base::FilePath& temp_dir,
base::RunLoop* run_loop)
- : crx_file_(crx_file), temp_dir_(temp_dir), run_loop_(run_loop),
- finished_(false), success_(false) {}
+ : crx_file_(file),
+ temp_dir_(temp_dir),
+ run_loop_(run_loop),
+ finished_(false),
+ success_(false) {}
bool finished() { return finished_; }
bool success() { return success_; }
@@ -185,7 +188,7 @@ class ValidateCrxHelper : public SandboxedUnpackerClient {
}
// The file being validated.
- const base::FilePath& crx_file_;
+ const CRXFileInfo& crx_file_;
// The temporary directory where the sandboxed unpacker will do work.
const base::FilePath& temp_dir_;
@@ -222,8 +225,9 @@ bool StartupHelper::ValidateCrx(const base::CommandLine& cmd_line,
}
base::RunLoop run_loop;
+ CRXFileInfo file(path);
scoped_refptr<ValidateCrxHelper> helper(
- new ValidateCrxHelper(path, temp_dir.path(), &run_loop));
+ new ValidateCrxHelper(file, temp_dir.path(), &run_loop));
helper->Start();
if (!helper->finished())
run_loop.Run();
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/test_extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698