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

Side by Side Diff: components/safe_browsing_db/v4_protocol_manager_util.cc

Issue 2536913002: Small: PVer4: Enable syncing internal lists for Google Chrome builds. (Closed)
Patch Set: Address nparker's comments Created 4 years 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 | « components/safe_browsing_db/v4_protocol_manager_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/safe_browsing_db/v4_protocol_manager_util.h" 5 #include "components/safe_browsing_db/v4_protocol_manager_util.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/sha1.h" 10 #include "base/sha1.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // the platform_type empty, the server won't recognize the request and 84 // the platform_type empty, the server won't recognize the request and
85 // return an error response which will pollute our UMA metrics. 85 // return an error response which will pollute our UMA metrics.
86 return LINUX_PLATFORM; 86 return LINUX_PLATFORM;
87 #endif 87 #endif
88 } 88 }
89 89
90 const ListIdentifier GetCertCsdDownloadWhitelistId() { 90 const ListIdentifier GetCertCsdDownloadWhitelistId() {
91 return ListIdentifier(GetCurrentPlatformType(), CERT, CSD_DOWNLOAD_WHITELIST); 91 return ListIdentifier(GetCurrentPlatformType(), CERT, CSD_DOWNLOAD_WHITELIST);
92 } 92 }
93 93
94 const ListIdentifier GetChromeExtensionMalwareId() { 94 const ListIdentifier GetChromeExtMalwareId() {
95 return ListIdentifier(CHROME_PLATFORM, CHROME_EXTENSION, MALWARE_THREAT); 95 return ListIdentifier(CHROME_PLATFORM, CHROME_EXTENSION, MALWARE_THREAT);
96 } 96 }
97 97
98 const ListIdentifier GetChromeUrlApiId() { 98 const ListIdentifier GetChromeUrlApiId() {
99 return ListIdentifier(CHROME_PLATFORM, URL, API_ABUSE); 99 return ListIdentifier(CHROME_PLATFORM, URL, API_ABUSE);
100 } 100 }
101 101
102 const ListIdentifier GetChromeFilenameClientIncidentId() { 102 const ListIdentifier GetChromeFilenameClientIncidentId() {
103 return ListIdentifier(CHROME_PLATFORM, FILENAME, CLIENT_INCIDENT); 103 return ListIdentifier(CHROME_PLATFORM, FILENAME, CLIENT_INCIDENT);
104 } 104 }
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 const std::string hash = base::SHA1HashString(packed_ip); 578 const std::string hash = base::SHA1HashString(packed_ip);
579 DCHECK_EQ(20u, hash.size()); 579 DCHECK_EQ(20u, hash.size());
580 hashed_encoded_ip->resize(hash.size() + 1); 580 hashed_encoded_ip->resize(hash.size() + 1);
581 hashed_encoded_ip->replace(0, hash.size(), hash); 581 hashed_encoded_ip->replace(0, hash.size(), hash);
582 (*hashed_encoded_ip)[hash.size()] = static_cast<unsigned char>(128); 582 (*hashed_encoded_ip)[hash.size()] = static_cast<unsigned char>(128);
583 return true; 583 return true;
584 } 584 }
585 585
586 } // namespace safe_browsing 586 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_protocol_manager_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698