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

Unified Diff: extensions/browser/content_hash_reader.h

Issue 288273004: A bunch of remaining parts of extension content verification (Reland) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser test Created 6 years, 7 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_fetcher.cc ('k') | extensions/browser/content_hash_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_hash_reader.h
diff --git a/extensions/browser/content_hash_reader.h b/extensions/browser/content_hash_reader.h
index 7d11a38bf459af677749f45a53307db22e55b16c..b68378c487c602e6d239aae3824fb4fe5af1170d 100644
--- a/extensions/browser/content_hash_reader.h
+++ b/extensions/browser/content_hash_reader.h
@@ -6,6 +6,7 @@
#define EXTENSIONS_BROWSER_CONTENT_HASH_READER_H_
#include <string>
+#include <vector>
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
@@ -15,6 +16,8 @@
namespace extensions {
+class VerifiedContents;
+
// This class creates an object that will read expected hashes that may have
// been fetched/calculated by the ContentHashFetcher, and vends them out for
// use in ContentVerifyJob's.
@@ -50,7 +53,7 @@ class ContentHashReader : public base::RefCountedThreadSafe<ContentHashReader> {
friend class base::RefCountedThreadSafe<ContentHashReader>;
virtual ~ContentHashReader();
- bool ReadHashes(const base::FilePath& hashes_file);
+ enum InitStatus { NOT_INITIALIZED, SUCCESS, FAILURE };
std::string extension_id_;
base::Version extension_version_;
@@ -58,6 +61,15 @@ class ContentHashReader : public base::RefCountedThreadSafe<ContentHashReader> {
base::FilePath relative_path_;
ContentVerifierKey key_;
+ InitStatus status_;
+
+ // The blocksize used for generating the hashes.
+ int block_size_;
+
+ scoped_ptr<VerifiedContents> verified_contents_;
+
+ std::vector<std::string> hashes_;
+
DISALLOW_COPY_AND_ASSIGN(ContentHashReader);
};
« no previous file with comments | « extensions/browser/content_hash_fetcher.cc ('k') | extensions/browser/content_hash_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698