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

Unified Diff: extensions/browser/content_verifier.h

Issue 329303007: Fix several problems with the content verification code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responded to review comments Created 6 years, 6 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
« no previous file with comments | « extensions/browser/content_hash_reader.cc ('k') | extensions/browser/content_verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_verifier.h
diff --git a/extensions/browser/content_verifier.h b/extensions/browser/content_verifier.h
index 9096acde6debff651e7f9e6ffd52df270f3d5088..924fb9d10e1161ede0a637e3fe285b8f20d4a566 100644
--- a/extensions/browser/content_verifier.h
+++ b/extensions/browser/content_verifier.h
@@ -5,6 +5,9 @@
#ifndef EXTENSIONS_BROWSER_CONTENT_VERIFIER_H_
#define EXTENSIONS_BROWSER_CONTENT_VERIFIER_H_
+#include <set>
+#include <string>
+
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -46,12 +49,24 @@ class ContentVerifier : public base::RefCountedThreadSafe<ContentVerifier> {
void VerifyFailed(const std::string& extension_id,
ContentVerifyJob::FailureReason reason);
+ void OnFetchComplete(const std::string& extension_id,
+ bool success,
+ bool was_force_check,
+ const std::set<base::FilePath>& hash_mismatch_paths);
+
private:
DISALLOW_COPY_AND_ASSIGN(ContentVerifier);
friend class base::RefCountedThreadSafe<ContentVerifier>;
virtual ~ContentVerifier();
+ // Returns true if any of the paths in |relative_paths| *should* have their
+ // contents verified. (Some files get transcoded during the install process,
+ // so we don't want to verify their contents because they are expected not
+ // to match).
+ bool ShouldVerifyAnyPaths(const Extension* extension,
+ const std::set<base::FilePath>& relative_paths);
+
// Note that it is important for these to appear in increasing "severity"
// order, because we use this to let command line flags increase, but not
// decrease, the mode you're running in compared to the experiment group.
« no previous file with comments | « extensions/browser/content_hash_reader.cc ('k') | extensions/browser/content_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698