Index: extensions/browser/computed_hashes.h |
diff --git a/extensions/browser/computed_hashes.h b/extensions/browser/computed_hashes.h |
index c68175c8d2c832107335eb4d8abd60266b23540f..c5e2052b8602a678e8587a5d8b19f67bf587b74c 100644 |
--- a/extensions/browser/computed_hashes.h |
+++ b/extensions/browser/computed_hashes.h |
@@ -9,10 +9,11 @@ |
#include <string> |
#include <vector> |
-#include "base/values.h" |
+#include "base/memory/scoped_ptr.h" |
namespace base { |
class FilePath; |
+class ListValue; |
} |
namespace extensions { |
@@ -54,9 +55,16 @@ class ComputedHashes { |
bool WriteToFile(const base::FilePath& path); |
private: |
- // The top-level object that will be serialized as JSON. |
- base::ListValue file_list_; |
+ // Each element of this list contains the path and block hashes for one |
+ // file. |
+ scoped_ptr<base::ListValue> file_list_; |
}; |
+ |
+ // Computes the SHA256 hash of each |block_size| chunk in |contents|, placing |
+ // the results into |hashes|. |
+ static void ComputeHashesForContent(const std::string& contents, |
+ size_t block_size, |
+ std::vector<std::string>* hashes); |
}; |
} // namespace extensions |