summaryrefslogtreecommitdiffstats
path: root/extensions/browser/info_map.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-08 23:54:27 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-08 23:54:27 +0000
commitfd3df77805388c12b7a20149c4fc4a8c061df26d (patch)
tree8023b2d806afa6bfe69e502e0837d48ca7fd3d74 /extensions/browser/info_map.cc
parentc91996eb60a08c62c329201e5468ee92afff1c13 (diff)
downloadchromium_src-fd3df77805388c12b7a20149c4fc4a8c061df26d.zip
chromium_src-fd3df77805388c12b7a20149c4fc4a8c061df26d.tar.gz
chromium_src-fd3df77805388c12b7a20149c4fc4a8c061df26d.tar.bz2
Beginning of support for extension content verification
The basic idea is that the webstore will provide signed expected hashes of file content that can be checked during runtime in the browser to detect corruption due to disk errors or malware. This CL has a lot of the high-level pieces, with several of the details left out for subsequent CLs to make this one more easily digestible. The design is that there is a ContentVerifier for each BrowserContext which can be used anywhere we read from files inside an extension. It vends out ContentVerifyJob's, which need to be informed of the bytes read from each file, and will know how to check those against a set of expected block hashes. If the job detects contents that don't match what was expected, it will notify the verifier. BUG=369895 R=rvargas@chromium.org, yoz@chromium.org Review URL: https://codereview.chromium.org/266963003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/info_map.cc')
-rw-r--r--extensions/browser/info_map.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/browser/info_map.cc b/extensions/browser/info_map.cc
index 408b4f1..42b85c5 100644
--- a/extensions/browser/info_map.cc
+++ b/extensions/browser/info_map.cc
@@ -5,6 +5,7 @@
#include "extensions/browser/info_map.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/content_verifier.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -207,6 +208,10 @@ bool InfoMap::AreNotificationsDisabled(
return false;
}
+void InfoMap::SetContentVerifier(ContentVerifier* verifier) {
+ content_verifier_ = verifier;
+}
+
InfoMap::~InfoMap() {
if (quota_service_) {
BrowserThread::DeleteSoon(