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/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/google/google_util.h" | |
12 #include "chrome/browser/safe_browsing/chunk.pb.h" | 11 #include "chrome/browser/safe_browsing/chunk.pb.h" |
| 12 #include "components/google/core/browser/google_util.h" |
13 #include "crypto/sha2.h" | 13 #include "crypto/sha2.h" |
14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 #include "url/url_util.h" | 16 #include "url/url_util.h" |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 #include "chrome/installer/util/browser_distribution.h" | 19 #include "chrome/installer/util/browser_distribution.h" |
20 #endif | 20 #endif |
21 | 21 |
22 static const char kReportParams[] = "?tpl=%s&url=%s"; | 22 static const char kReportParams[] = "?tpl=%s&url=%s"; |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); | 493 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); |
494 return hash_out; | 494 return hash_out; |
495 } | 495 } |
496 | 496 |
497 std::string SBFullHashToString(const SBFullHash& hash) { | 497 std::string SBFullHashToString(const SBFullHash& hash) { |
498 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); | 498 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); |
499 return std::string(hash.full_hash, sizeof(hash.full_hash)); | 499 return std::string(hash.full_hash, sizeof(hash.full_hash)); |
500 } | 500 } |
501 | 501 |
502 } // namespace safe_browsing_util | 502 } // namespace safe_browsing_util |
OLD | NEW |