OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/safe_browsing/safe_browsing_util.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
11 #include "crypto/sha2.h" | 11 #include "crypto/sha2.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "googleurl/src/url_util.h" | 13 #include "googleurl/src/url_util.h" |
14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
15 | 15 |
16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
17 #include "chrome/installer/util/browser_distribution.h" | 17 #include "chrome/installer/util/browser_distribution.h" |
18 #endif | 18 #endif |
19 | 19 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); | 515 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); |
516 return hash_out; | 516 return hash_out; |
517 } | 517 } |
518 | 518 |
519 std::string SBFullHashToString(const SBFullHash& hash) { | 519 std::string SBFullHashToString(const SBFullHash& hash) { |
520 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); | 520 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); |
521 return std::string(hash.full_hash, sizeof(hash.full_hash)); | 521 return std::string(hash.full_hash, sizeof(hash.full_hash)); |
522 } | 522 } |
523 | 523 |
524 } // namespace safe_browsing_util | 524 } // namespace safe_browsing_util |
OLD | NEW |