Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_util.cc

Issue 333723002: Componentize google_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + build fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698