OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ | 5 #ifndef EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ |
6 #define EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ | 6 #define EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 | 15 |
14 namespace base { | 16 namespace base { |
15 class FilePath; | 17 class FilePath; |
16 class ListValue; | 18 class ListValue; |
17 } | 19 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Computes the SHA256 hash of each |block_size| chunk in |contents|, placing | 65 // Computes the SHA256 hash of each |block_size| chunk in |contents|, placing |
64 // the results into |hashes|. | 66 // the results into |hashes|. |
65 static void ComputeHashesForContent(const std::string& contents, | 67 static void ComputeHashesForContent(const std::string& contents, |
66 size_t block_size, | 68 size_t block_size, |
67 std::vector<std::string>* hashes); | 69 std::vector<std::string>* hashes); |
68 }; | 70 }; |
69 | 71 |
70 } // namespace extensions | 72 } // namespace extensions |
71 | 73 |
72 #endif // EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ | 74 #endif // EXTENSIONS_BROWSER_COMPUTED_HASHES_H_ |
OLD | NEW |