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_MALWARE_DETAILS_CACHE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_CACHE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_CACHE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_CACHE_H_ |
7 | 7 |
8 // A class that gets malware details from the HTTP Cache. | 8 // A class that gets malware details from the HTTP Cache. |
9 // An instance of this class is generated by MalwareDetails. | 9 // An instance of this class is generated by MalwareDetails. |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 safe_browsing::ResourceMap* resources, | 47 safe_browsing::ResourceMap* resources, |
48 bool* result, | 48 bool* result, |
49 const base::Closure& callback); | 49 const base::Closure& callback); |
50 | 50 |
51 // Returns whether or not StartCacheCollection has been called. | 51 // Returns whether or not StartCacheCollection has been called. |
52 bool HasStarted(); | 52 bool HasStarted(); |
53 | 53 |
54 protected: | 54 protected: |
55 // Implementation of URLFetcher::Delegate. Called after the request | 55 // Implementation of URLFetcher::Delegate. Called after the request |
56 // completes (either successfully or with failure). | 56 // completes (either successfully or with failure). |
57 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 57 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
58 | 58 |
59 private: | 59 private: |
60 friend class base::RefCountedThreadSafe<MalwareDetailsCacheCollector>; | 60 friend class base::RefCountedThreadSafe<MalwareDetailsCacheCollector>; |
61 | 61 |
62 virtual ~MalwareDetailsCacheCollector(); | 62 virtual ~MalwareDetailsCacheCollector(); |
63 | 63 |
64 // Points to the url for which we are fetching the HTTP cache entry or | 64 // Points to the url for which we are fetching the HTTP cache entry or |
65 // redirect chain. | 65 // redirect chain. |
66 safe_browsing::ResourceMap::iterator resources_it_; | 66 safe_browsing::ResourceMap::iterator resources_it_; |
67 | 67 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const std::string& data); | 102 const std::string& data); |
103 | 103 |
104 // Called when we are done. | 104 // Called when we are done. |
105 void AllDone(bool success); | 105 void AllDone(bool success); |
106 | 106 |
107 // Advances to the next entry in resources_it_. | 107 // Advances to the next entry in resources_it_. |
108 void AdvanceEntry(); | 108 void AdvanceEntry(); |
109 }; | 109 }; |
110 | 110 |
111 #endif // CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_CACHE_H_ | 111 #endif // CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_CACHE_H_ |
OLD | NEW |