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 #ifndef CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ |
7 | 7 |
8 // A class that gets threat details from the HTTP Cache. | 8 // A class that gets threat details from the HTTP Cache. |
9 // An instance of this class is generated by ThreatDetails. | 9 // An instance of this class is generated by ThreatDetails. |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
16 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "chrome/common/safe_browsing/csd.pb.h" | 18 #include "chrome/common/safe_browsing/csd.pb.h" |
19 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
20 #include "net/url_request/url_fetcher_delegate.h" | 20 #include "net/url_request/url_fetcher_delegate.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 class URLFetcher; | 23 class URLFetcher; |
24 class URLRequestContext; | |
25 } | 24 } |
26 | 25 |
27 namespace safe_browsing { | 26 namespace safe_browsing { |
28 | 27 |
29 // Maps a URL to its Resource. | 28 // Maps a URL to its Resource. |
30 typedef base::hash_map< | 29 typedef base::hash_map< |
31 std::string, | 30 std::string, |
32 linked_ptr<ClientSafeBrowsingReportRequest::Resource>> | 31 linked_ptr<ClientSafeBrowsingReportRequest::Resource>> |
33 ResourceMap; | 32 ResourceMap; |
34 | 33 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Called when we are done. | 102 // Called when we are done. |
104 void AllDone(bool success); | 103 void AllDone(bool success); |
105 | 104 |
106 // Advances to the next entry in resources_it_. | 105 // Advances to the next entry in resources_it_. |
107 void AdvanceEntry(); | 106 void AdvanceEntry(); |
108 }; | 107 }; |
109 | 108 |
110 } // namespace safe_browsing | 109 } // namespace safe_browsing |
111 | 110 |
112 #endif // CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ | 111 #endif // CHROME_BROWSER_SAFE_BROWSING_THREAT_DETAILS_CACHE_H_ |
OLD | NEW |