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_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "chrome/browser/renderer_host/resource_handler.h" | 9 #include "chrome/browser/renderer_host/resource_handler.h" |
10 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 10 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 const GURL& url, | 21 const GURL& url, |
22 ResourceType::Type resource_type, | 22 ResourceType::Type resource_type, |
23 SafeBrowsingService* safe_browsing, | 23 SafeBrowsingService* safe_browsing, |
24 ResourceDispatcherHost* resource_dispatcher_host); | 24 ResourceDispatcherHost* resource_dispatcher_host); |
25 | 25 |
26 // ResourceHandler implementation: | 26 // ResourceHandler implementation: |
27 bool OnUploadProgress(int request_id, uint64 position, uint64 size); | 27 bool OnUploadProgress(int request_id, uint64 position, uint64 size); |
28 bool OnRequestRedirected(int request_id, const GURL& new_url); | 28 bool OnRequestRedirected(int request_id, const GURL& new_url); |
29 bool OnResponseStarted(int request_id, ResourceResponse* response); | 29 bool OnResponseStarted(int request_id, ResourceResponse* response); |
30 void OnGetHashTimeout(); | 30 void OnGetHashTimeout(); |
31 bool OnWillRead(int request_id, char** buf, int* buf_size, int min_size); | 31 bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, |
| 32 int min_size); |
32 bool OnReadCompleted(int request_id, int* bytes_read); | 33 bool OnReadCompleted(int request_id, int* bytes_read); |
33 bool OnResponseCompleted(int request_id, const URLRequestStatus& status); | 34 bool OnResponseCompleted(int request_id, const URLRequestStatus& status); |
34 | 35 |
35 // SafeBrowsingService::Client implementation, called on the IO thread once | 36 // SafeBrowsingService::Client implementation, called on the IO thread once |
36 // the URL has been classified. | 37 // the URL has been classified. |
37 void OnUrlCheckResult(const GURL& url, | 38 void OnUrlCheckResult(const GURL& url, |
38 SafeBrowsingService::UrlCheckResult result); | 39 SafeBrowsingService::UrlCheckResult result); |
39 | 40 |
40 // SafeBrowsingService::Client implementation, called on the IO thread when | 41 // SafeBrowsingService::Client implementation, called on the IO thread when |
41 // the user has decided to proceed with the current request, or go back. | 42 // the user has decided to proceed with the current request, or go back. |
(...skipping 12 matching lines...) Expand all Loading... |
54 int queued_error_request_id_; | 55 int queued_error_request_id_; |
55 ResourceDispatcherHost* rdh_; | 56 ResourceDispatcherHost* rdh_; |
56 base::Time pause_time_; | 57 base::Time pause_time_; |
57 ResourceType::Type resource_type_; | 58 ResourceType::Type resource_type_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); | 60 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); |
60 }; | 61 }; |
61 | 62 |
62 | 63 |
63 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 64 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
OLD | NEW |