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

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

Issue 1402783005: Remove safe_browsing=2 functionality, replace with =3 mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix up histograms Created 5 years, 2 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return true; 166 return true;
167 } 167 }
168 } 168 }
169 return false; 169 return false;
170 } 170 }
171 } // namespace 171 } // namespace
172 172
173 namespace safe_browsing_util { 173 namespace safe_browsing_util {
174 174
175 // Listnames that browser can process. 175 // Listnames that browser can process.
176 // TODO(shess): This shouldn't be OS-driven <http://crbug.com/394379>
177 #if defined(OS_ANDROID)
178 // NOTE(shess): This difference is also reflected in the store name in
179 // safe_browsing_database.cc.
180 const char kMalwareList[] = "goog-mobilemalware-shavar";
181 const char kPhishingList[] = "goog-mobilephish-shavar";
182 #else
183 const char kMalwareList[] = "goog-malware-shavar"; 176 const char kMalwareList[] = "goog-malware-shavar";
184 const char kPhishingList[] = "goog-phish-shavar"; 177 const char kPhishingList[] = "goog-phish-shavar";
185 #endif
186 const char kBinUrlList[] = "goog-badbinurl-shavar"; 178 const char kBinUrlList[] = "goog-badbinurl-shavar";
187 const char kCsdWhiteList[] = "goog-csdwhite-sha256"; 179 const char kCsdWhiteList[] = "goog-csdwhite-sha256";
188 const char kDownloadWhiteList[] = "goog-downloadwhite-digest256"; 180 const char kDownloadWhiteList[] = "goog-downloadwhite-digest256";
189 const char kExtensionBlacklist[] = "goog-badcrxids-digestvar"; 181 const char kExtensionBlacklist[] = "goog-badcrxids-digestvar";
190 const char kIPBlacklist[] = "goog-badip-digest256"; 182 const char kIPBlacklist[] = "goog-badip-digest256";
191 const char kUnwantedUrlList[] = "goog-unwanted-shavar"; 183 const char kUnwantedUrlList[] = "goog-unwanted-shavar";
192 const char kInclusionWhitelist[] = "goog-csdinclusionwhite-sha256"; 184 const char kInclusionWhitelist[] = "goog-csdinclusionwhite-sha256";
193 185
194 const char* kAllLists[9] = { 186 const char* kAllLists[9] = {
195 kMalwareList, 187 kMalwareList,
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length); 511 memcpy(hash_out.full_hash, hash_in.data(), crypto::kSHA256Length);
520 return hash_out; 512 return hash_out;
521 } 513 }
522 514
523 std::string SBFullHashToString(const SBFullHash& hash) { 515 std::string SBFullHashToString(const SBFullHash& hash) {
524 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash)); 516 DCHECK_EQ(crypto::kSHA256Length, sizeof(hash.full_hash));
525 return std::string(hash.full_hash, sizeof(hash.full_hash)); 517 return std::string(hash.full_hash, sizeof(hash.full_hash));
526 } 518 }
527 519
528 } // namespace safe_browsing_util 520 } // namespace safe_browsing_util
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698