OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PROTOCOL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
7 | 7 |
8 // A class that implements Chrome's interface with the SafeBrowsing protocol. | 8 // A class that implements Chrome's interface with the SafeBrowsing protocol. |
9 // The SafeBrowsingProtocolManager handles formatting and making requests of, | 9 // The SafeBrowsingProtocolManager handles formatting and making requests of, |
10 // and handling responses from, Google's SafeBrowsing servers. This class uses | 10 // and handling responses from, Google's SafeBrowsing servers. This class uses |
11 // The SafeBrowsingProtocolParser class to do the actual parsing. | 11 // The SafeBrowsingProtocolParser class to do the actual parsing. |
12 | 12 |
13 #include <deque> | 13 #include <deque> |
14 #include <string> | |
15 #include <vector> | |
16 | 14 |
17 #include "base/hash_tables.h" | 15 #include "base/hash_tables.h" |
18 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
19 #include "base/time.h" | 17 #include "base/time.h" |
20 #include "chrome/browser/net/url_fetcher.h" | 18 #include "chrome/browser/net/url_fetcher.h" |
21 #include "chrome/browser/safe_browsing/chunk_range.h" | 19 #include "chrome/browser/safe_browsing/chunk_range.h" |
22 #include "chrome/browser/safe_browsing/protocol_parser.h" | 20 #include "chrome/browser/safe_browsing/protocol_parser.h" |
23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 21 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
24 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 22 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
25 #include "net/url_request/url_request.h" | |
26 #include "testing/gtest/include/gtest/gtest_prod.h" | 23 #include "testing/gtest/include/gtest/gtest_prod.h" |
27 | 24 |
28 class MessageLoop; | 25 class MessageLoop; |
29 class Task; | 26 class Task; |
30 class Timer; | 27 class Timer; |
| 28 class URLRequestStatus; |
31 | 29 |
32 #if defined(COMPILER_GCC) | 30 #if defined(COMPILER_GCC) |
33 // Allows us to use URLFetchers in a hash_map with gcc (MSVC is okay without | 31 // Allows us to use URLFetchers in a hash_map with gcc (MSVC is okay without |
34 // specifying this). | 32 // specifying this). |
35 namespace __gnu_cxx { | 33 namespace __gnu_cxx { |
36 template<> | 34 template<> |
37 struct hash<const URLFetcher*> { | 35 struct hash<const URLFetcher*> { |
38 size_t operator()(const URLFetcher* fetcher) const { | 36 size_t operator()(const URLFetcher* fetcher) const { |
39 return reinterpret_cast<size_t>(fetcher); | 37 return reinterpret_cast<size_t>(fetcher); |
40 } | 38 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // Used for measuring chunk request latency. | 220 // Used for measuring chunk request latency. |
223 base::Time chunk_request_start_; | 221 base::Time chunk_request_start_; |
224 | 222 |
225 // Track the size of each update (in bytes). | 223 // Track the size of each update (in bytes). |
226 int update_size_; | 224 int update_size_; |
227 | 225 |
228 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); | 226 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); |
229 }; | 227 }; |
230 | 228 |
231 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 229 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
OLD | NEW |