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 "chrome/browser/safe_browsing/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/safe_browsing_service.h" | 15 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
16 #include "chrome/browser/safe_browsing/threat_details_cache.h" | 16 #include "chrome/browser/safe_browsing/threat_details_cache.h" |
| 17 #include "chrome/common/safe_browsing/csd.pb.h" |
17 #include "components/data_use_measurement/core/data_use_user_data.h" | 18 #include "components/data_use_measurement/core/data_use_user_data.h" |
18 #include "components/safe_browsing/csd.pb.h" | |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 #include "net/base/host_port_pair.h" | 20 #include "net/base/host_port_pair.h" |
21 #include "net/base/load_flags.h" | 21 #include "net/base/load_flags.h" |
22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
23 #include "net/http/http_response_headers.h" | 23 #include "net/http/http_response_headers.h" |
24 #include "net/url_request/url_fetcher.h" | 24 #include "net/url_request/url_fetcher.h" |
25 #include "net/url_request/url_request_context_getter.h" | 25 #include "net/url_request/url_request_context_getter.h" |
26 #include "net/url_request/url_request_status.h" | 26 #include "net/url_request/url_request_status.h" |
27 | 27 |
28 using content::BrowserThread; | 28 using content::BrowserThread; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 void ThreatDetailsCacheCollector::AllDone(bool success) { | 205 void ThreatDetailsCacheCollector::AllDone(bool success) { |
206 DVLOG(1) << "AllDone"; | 206 DVLOG(1) << "AllDone"; |
207 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 207 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
208 *result_ = success; | 208 *result_ = success; |
209 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); | 209 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); |
210 callback_.Reset(); | 210 callback_.Reset(); |
211 } | 211 } |
212 | 212 |
213 } // namespace safe_browsing | 213 } // namespace safe_browsing |
OLD | NEW |