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 #include "extensions/browser/computed_hashes.h" | 5 #include "extensions/browser/computed_hashes.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/file_util.h" | |
9 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "crypto/secure_hash.h" | 14 #include "crypto/secure_hash.h" |
15 #include "crypto/sha2.h" | 15 #include "crypto/sha2.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 const char kBlockHashesKey[] = "block_hashes"; | 18 const char kBlockHashesKey[] = "block_hashes"; |
19 const char kBlockSizeKey[] = "block_size"; | 19 const char kBlockSizeKey[] = "block_size"; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 // If |contents| is empty, then we want to just exit here. | 174 // If |contents| is empty, then we want to just exit here. |
175 if (bytes_to_read == 0) | 175 if (bytes_to_read == 0) |
176 break; | 176 break; |
177 | 177 |
178 offset += bytes_to_read; | 178 offset += bytes_to_read; |
179 } while (offset < contents.size()); | 179 } while (offset < contents.size()); |
180 } | 180 } |
181 | 181 |
182 } // namespace extensions | 182 } // namespace extensions |
OLD | NEW |