OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/profile_resetter/jtl_foundation.h" | 5 #include "chrome/browser/profile_resetter/jtl_foundation.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 return cached_hashes_[input]; | 33 return cached_hashes_[input]; |
34 } | 34 } |
35 | 35 |
36 // static | 36 // static |
37 bool Hasher::IsHash(const std::string& maybe_hash) { | 37 bool Hasher::IsHash(const std::string& maybe_hash) { |
38 if (maybe_hash.size() != kHashSizeInBytes) | 38 if (maybe_hash.size() != kHashSizeInBytes) |
39 return false; | 39 return false; |
40 for (std::string::const_iterator it = maybe_hash.begin(); | 40 for (std::string::const_iterator it = maybe_hash.begin(); |
41 it != maybe_hash.end(); ++it) { | 41 it != maybe_hash.end(); ++it) { |
42 if (!IsHexDigit(*it)) | 42 if (!base::IsHexDigit(*it)) |
43 return false; | 43 return false; |
44 } | 44 } |
45 return true; | 45 return true; |
46 } | 46 } |
47 | 47 |
48 } // namespace jtl_foundation | 48 } // namespace jtl_foundation |
OLD | NEW |