| OLD | NEW |
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 GetUrlMalwareId() { | 92 const ListIdentifier GetUrlMalwareId() { |
| 93 return ListIdentifier(GetCurrentPlatformType(), URL, MALWARE_THREAT); | 93 return ListIdentifier(GetCurrentPlatformType(), URL, MALWARE_THREAT); |
| 94 } | 94 } |
| 95 | 95 |
| 96 const ListIdentifier GetUrlMalBinId() { |
| 97 return ListIdentifier(GetCurrentPlatformType(), URL, MALICIOUS_BINARY); |
| 98 } |
| 99 |
| 96 const ListIdentifier GetUrlSocEngId() { | 100 const ListIdentifier GetUrlSocEngId() { |
| 97 return ListIdentifier(GetCurrentPlatformType(), URL, | 101 return ListIdentifier(GetCurrentPlatformType(), URL, |
| 98 SOCIAL_ENGINEERING_PUBLIC); | 102 SOCIAL_ENGINEERING_PUBLIC); |
| 99 } | 103 } |
| 100 | 104 |
| 101 const ListIdentifier GetUrlUwsId() { | 105 const ListIdentifier GetUrlUwsId() { |
| 102 return ListIdentifier(GetCurrentPlatformType(), URL, UNWANTED_SOFTWARE); | 106 return ListIdentifier(GetCurrentPlatformType(), URL, UNWANTED_SOFTWARE); |
| 103 } | 107 } |
| 104 | 108 |
| 105 // The Safe Browsing V4 server URL prefix. | 109 // The Safe Browsing V4 server URL prefix. |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 // static | 507 // static |
| 504 void V4ProtocolManagerUtil::SetClientInfoFromConfig( | 508 void V4ProtocolManagerUtil::SetClientInfoFromConfig( |
| 505 ClientInfo* client_info, | 509 ClientInfo* client_info, |
| 506 const V4ProtocolConfig& config) { | 510 const V4ProtocolConfig& config) { |
| 507 DCHECK(client_info); | 511 DCHECK(client_info); |
| 508 client_info->set_client_id(config.client_name); | 512 client_info->set_client_id(config.client_name); |
| 509 client_info->set_client_version(config.version); | 513 client_info->set_client_version(config.version); |
| 510 } | 514 } |
| 511 | 515 |
| 512 } // namespace safe_browsing | 516 } // namespace safe_browsing |
| OLD | NEW |