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

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

Issue 2450413002: Small: Implement CheckResourceUrl (Closed)
Patch Set: git rebase Created 4 years, 1 month 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/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // the platform_type empty, the server won't recognize the request and 82 // the platform_type empty, the server won't recognize the request and
83 // return an error response which will pollute our UMA metrics. 83 // return an error response which will pollute our UMA metrics.
84 return LINUX_PLATFORM; 84 return LINUX_PLATFORM;
85 #endif 85 #endif
86 } 86 }
87 87
88 const ListIdentifier GetChromeUrlApiId() { 88 const ListIdentifier GetChromeUrlApiId() {
89 return ListIdentifier(CHROME_PLATFORM, URL, API_ABUSE); 89 return ListIdentifier(CHROME_PLATFORM, URL, API_ABUSE);
90 } 90 }
91 91
92 const ListIdentifier GetChromeUrlClientIncidentId() {
93 return ListIdentifier(CHROME_PLATFORM, URL, CLIENT_INCIDENT);
94 }
95
92 const ListIdentifier GetUrlMalwareId() { 96 const ListIdentifier GetUrlMalwareId() {
93 return ListIdentifier(GetCurrentPlatformType(), URL, MALWARE_THREAT); 97 return ListIdentifier(GetCurrentPlatformType(), URL, MALWARE_THREAT);
94 } 98 }
95 99
96 const ListIdentifier GetUrlMalBinId() { 100 const ListIdentifier GetUrlMalBinId() {
97 return ListIdentifier(GetCurrentPlatformType(), URL, MALICIOUS_BINARY); 101 return ListIdentifier(GetCurrentPlatformType(), URL, MALICIOUS_BINARY);
98 } 102 }
99 103
100 const ListIdentifier GetUrlSocEngId() { 104 const ListIdentifier GetUrlSocEngId() {
101 return ListIdentifier(GetCurrentPlatformType(), URL, 105 return ListIdentifier(GetCurrentPlatformType(), URL,
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // static 511 // static
508 void V4ProtocolManagerUtil::SetClientInfoFromConfig( 512 void V4ProtocolManagerUtil::SetClientInfoFromConfig(
509 ClientInfo* client_info, 513 ClientInfo* client_info,
510 const V4ProtocolConfig& config) { 514 const V4ProtocolConfig& config) {
511 DCHECK(client_info); 515 DCHECK(client_info);
512 client_info->set_client_id(config.client_name); 516 client_info->set_client_id(config.client_name);
513 client_info->set_client_version(config.version); 517 client_info->set_client_version(config.version);
514 } 518 }
515 519
516 } // namespace safe_browsing 520 } // 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