| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/common/component_flash_hint_file_linux.h" | 5 #include "chrome/common/component_flash_hint_file_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <sys/mman.h> | 8 #include <sys/mman.h> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 22 #include "crypto/secure_hash.h" | 22 #include "crypto/secure_hash.h" |
| 23 #include "crypto/secure_util.h" | 23 #include "crypto/secure_util.h" |
| 24 #include "crypto/sha2.h" | 24 #include "crypto/sha2.h" |
| 25 | 25 |
| 26 namespace chrome { | 26 namespace chrome { |
| 27 | 27 |
| 28 namespace component_flash_hint_file { | 28 namespace component_flash_hint_file { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 |
| 31 // The current version of the hints file. | 32 // The current version of the hints file. |
| 32 const int kCurrentHintFileVersion = 0x10; | 33 const int kCurrentHintFileVersion = 0x10; |
| 33 // The earliest version of the hints file. | 34 // The earliest version of the hints file. |
| 34 const int kEarliestHintFileVersion = 0x10; | 35 const int kEarliestHintFileVersion = 0x10; |
| 35 // The Version field in the JSON encoded file. | 36 // The Version field in the JSON encoded file. |
| 36 const char kVersionField[] = "Version"; | 37 const char kVersionField[] = "Version"; |
| 37 // The HashAlgorithm field in the JSON encoded file. | 38 // The HashAlgorithm field in the JSON encoded file. |
| 38 const char kHashAlgoField[] = "HashAlgorithm"; | 39 const char kHashAlgoField[] = "HashAlgorithm"; |
| 39 // The Hash field in the JSON encoded file. | 40 // The Hash field in the JSON encoded file. |
| 40 const char kHashField[] = "Hash"; | 41 const char kHashField[] = "Hash"; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 217 } |
| 217 | 218 |
| 218 *path = plugin_path; | 219 *path = plugin_path; |
| 219 flash_version->assign(plugin_version_str); | 220 flash_version->assign(plugin_version_str); |
| 220 return true; | 221 return true; |
| 221 } | 222 } |
| 222 | 223 |
| 223 } // namespace component_flash_hint_file | 224 } // namespace component_flash_hint_file |
| 224 | 225 |
| 225 } // namespace chrome | 226 } // namespace chrome |
| OLD | NEW |