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

Unified Diff: chrome/browser/extensions/extension_service.h

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/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 8f760f9560f4db3132d892faca31b33165764fe0..67192143385f62f50da3134bfd1955a34ceddcf1 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -87,6 +87,14 @@ class ExtensionServiceInterface
bool file_ownership_passed,
extensions::CrxInstaller** out_crx_installer) = 0;
+ // Same as above, but checks .crx file hash sum as well.
+ virtual bool CheckAndUpdateExtension(
+ const std::string& id,
+ const base::FilePath& path,
+ const std::string& hash,
+ bool file_ownership_passed,
+ extensions::CrxInstaller** out_crx_installer) = 0;
+
// DEPRECATED. Use ExtensionRegistry instead.
//
// Looks up an extension by its ID.
@@ -210,6 +218,12 @@ class ExtensionService
const base::FilePath& extension_path,
bool file_ownership_passed,
extensions::CrxInstaller** out_crx_installer) override;
+ bool CheckAndUpdateExtension(
+ const std::string& id,
+ const base::FilePath& extension_path,
+ const std::string& package_hash,
+ bool file_ownership_passed,
+ extensions::CrxInstaller** out_crx_installer) override;
bool IsExtensionEnabled(const std::string& extension_id) const override;
void UnloadExtension(
const std::string& extension_id,

Powered by Google App Engine
This is Rietveld 408576698