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 MalwareDetails class. | 5 // Implementation of the MalwareDetails class. |
6 | 6 |
7 #include "chrome/browser/safe_browsing/malware_details.h" | 7 #include "chrome/browser/safe_browsing/malware_details.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/md5.h" | 11 #include "base/md5.h" |
12 #include "base/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "chrome/browser/net/chrome_url_request_context.h" | 13 #include "chrome/browser/net/chrome_url_request_context.h" |
14 #include "chrome/browser/safe_browsing/malware_details_cache.h" | 14 #include "chrome/browser/safe_browsing/malware_details_cache.h" |
15 #include "chrome/browser/safe_browsing/report.pb.h" | 15 #include "chrome/browser/safe_browsing/report.pb.h" |
16 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 16 #include "chrome/browser/safe_browsing/safe_browsing_service.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/url_request/url_fetcher.h" | 22 #include "net/url_request/url_fetcher.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 base::Bind(&MalwareDetailsCacheCollector::OpenEntry, this)); | 201 base::Bind(&MalwareDetailsCacheCollector::OpenEntry, this)); |
202 } | 202 } |
203 | 203 |
204 void MalwareDetailsCacheCollector::AllDone(bool success) { | 204 void MalwareDetailsCacheCollector::AllDone(bool success) { |
205 DVLOG(1) << "AllDone"; | 205 DVLOG(1) << "AllDone"; |
206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
207 *result_ = success; | 207 *result_ = success; |
208 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); | 208 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); |
209 callback_.Reset(); | 209 callback_.Reset(); |
210 } | 210 } |
OLD | NEW |