OLD | NEW |
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/browser_feature_extractor.h" | 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 IPUrlInfo::IPUrlInfo(const std::string& url, | 64 IPUrlInfo::IPUrlInfo(const std::string& url, |
65 const std::string& method, | 65 const std::string& method, |
66 const std::string& referrer, | 66 const std::string& referrer, |
67 const ResourceType& resource_type) | 67 const ResourceType& resource_type) |
68 : url(url), | 68 : url(url), |
69 method(method), | 69 method(method), |
70 referrer(referrer), | 70 referrer(referrer), |
71 resource_type(resource_type) { | 71 resource_type(resource_type) { |
72 } | 72 } |
73 | 73 |
| 74 IPUrlInfo::IPUrlInfo(const IPUrlInfo& other) = default; |
| 75 |
74 IPUrlInfo::~IPUrlInfo() {} | 76 IPUrlInfo::~IPUrlInfo() {} |
75 | 77 |
76 BrowseInfo::BrowseInfo() : http_status_code(0) {} | 78 BrowseInfo::BrowseInfo() : http_status_code(0) {} |
77 | 79 |
78 BrowseInfo::~BrowseInfo() {} | 80 BrowseInfo::~BrowseInfo() {} |
79 | 81 |
80 static void AddFeature(const std::string& feature_name, | 82 static void AddFeature(const std::string& feature_name, |
81 double feature_value, | 83 double feature_value, |
82 ClientPhishingRequest* request) { | 84 ClientPhishingRequest* request) { |
83 DCHECK(request); | 85 DCHECK(request); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // Limit the number of matched bad IPs in one request to control | 487 // Limit the number of matched bad IPs in one request to control |
486 // the request's size | 488 // the request's size |
487 if (matched_bad_ips >= kMaxMalwareIPPerRequest) { | 489 if (matched_bad_ips >= kMaxMalwareIPPerRequest) { |
488 break; | 490 break; |
489 } | 491 } |
490 } | 492 } |
491 callback.Run(true, std::move(request)); | 493 callback.Run(true, std::move(request)); |
492 } | 494 } |
493 | 495 |
494 } // namespace safe_browsing | 496 } // namespace safe_browsing |
OLD | NEW |