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 // Implementation of the ThreatDetails class. | 5 // Implementation of the ThreatDetails class. |
6 | 6 |
7 #include "chrome/browser/safe_browsing/threat_details.h" | 7 #include "components/safe_browsing/browser/threat_details.h" |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/md5.h" | 13 #include "base/md5.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "chrome/browser/safe_browsing/threat_details_cache.h" | |
16 #include "components/data_use_measurement/core/data_use_user_data.h" | 15 #include "components/data_use_measurement/core/data_use_user_data.h" |
| 16 #include "components/safe_browsing/browser/threat_details_cache.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
19 #include "net/base/load_flags.h" | 19 #include "net/base/load_flags.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/http/http_response_headers.h" | 21 #include "net/http/http_response_headers.h" |
22 #include "net/traffic_annotation/network_traffic_annotation.h" | 22 #include "net/traffic_annotation/network_traffic_annotation.h" |
23 #include "net/url_request/url_fetcher.h" | 23 #include "net/url_request/url_fetcher.h" |
24 #include "net/url_request/url_request_context_getter.h" | 24 #include "net/url_request/url_request_context_getter.h" |
25 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
26 | 26 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 "When safe browsing extended report is collecting data." | 91 "When safe browsing extended report is collecting data." |
92 data: | 92 data: |
93 "None" | 93 "None" |
94 destination: OTHER | 94 destination: OTHER |
95 } | 95 } |
96 policy { | 96 policy { |
97 cookies_allowed: false | 97 cookies_allowed: false |
98 setting: | 98 setting: |
99 "Users can enable or disable this feature by stopping sending " | 99 "Users can enable or disable this feature by stopping sending " |
100 "security incident reports to Google via disabling 'Automatically " | 100 "security incident reports to Google via disabling 'Automatically " |
101 "report details of possible security incdients to Google.' in " | 101 "report details of possible security incidents to Google.' in " |
102 "Chrome's settings under Advanced Settings, Privacy. The feature " | 102 "Chrome's settings under Advanced Settings, Privacy. The feature " |
103 "is disabled by default." | 103 "is disabled by default." |
104 chrome_policy { | 104 chrome_policy { |
105 SafeBrowsingExtendedReportingOptInAllowed { | 105 SafeBrowsingExtendedReportingOptInAllowed { |
106 policy_options {mode: MANDATORY} | 106 policy_options {mode: MANDATORY} |
107 SafeBrowsingExtendedReportingOptInAllowed: false | 107 SafeBrowsingExtendedReportingOptInAllowed: false |
108 } | 108 } |
109 } | 109 } |
110 })"); | 110 })"); |
111 | 111 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 void ThreatDetailsCacheCollector::AllDone(bool success) { | 234 void ThreatDetailsCacheCollector::AllDone(bool success) { |
235 DVLOG(1) << "AllDone"; | 235 DVLOG(1) << "AllDone"; |
236 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 236 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
237 *result_ = success; | 237 *result_ = success; |
238 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); | 238 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); |
239 callback_.Reset(); | 239 callback_.Reset(); |
240 } | 240 } |
241 | 241 |
242 } // namespace safe_browsing | 242 } // namespace safe_browsing |
OLD | NEW |