OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 int render_process_host_id, | 47 int render_process_host_id, |
48 int render_view_id, | 48 int render_view_id, |
49 bool is_subresource, | 49 bool is_subresource, |
50 SafeBrowsingService* safe_browsing, | 50 SafeBrowsingService* safe_browsing, |
51 ResourceDispatcherHost* resource_dispatcher_host); | 51 ResourceDispatcherHost* resource_dispatcher_host); |
52 | 52 |
53 // ResourceHandler implementation: | 53 // ResourceHandler implementation: |
54 virtual bool OnUploadProgress( | 54 virtual bool OnUploadProgress( |
55 int request_id, uint64 position, uint64 size) OVERRIDE; | 55 int request_id, uint64 position, uint64 size) OVERRIDE; |
56 virtual bool OnRequestRedirected( | 56 virtual bool OnRequestRedirected( |
57 int request_id, const GURL& new_url, ResourceResponse* response, | 57 int request_id, const GURL& new_url, content::ResourceResponse* response, |
58 bool* defer) OVERRIDE; | 58 bool* defer) OVERRIDE; |
59 virtual bool OnResponseStarted( | 59 virtual bool OnResponseStarted( |
60 int request_id, ResourceResponse* response) OVERRIDE; | 60 int request_id, content::ResourceResponse* response) OVERRIDE; |
61 virtual bool OnWillStart( | 61 virtual bool OnWillStart( |
62 int request_id, const GURL& url, bool* defer) OVERRIDE; | 62 int request_id, const GURL& url, bool* defer) OVERRIDE; |
63 virtual bool OnWillRead( | 63 virtual bool OnWillRead( |
64 int request_id, net::IOBuffer** buf, int* buf_size, | 64 int request_id, net::IOBuffer** buf, int* buf_size, |
65 int min_size) OVERRIDE; | 65 int min_size) OVERRIDE; |
66 virtual bool OnReadCompleted(int request_id, int* bytes_read) OVERRIDE; | 66 virtual bool OnReadCompleted(int request_id, int* bytes_read) OVERRIDE; |
67 virtual bool OnResponseCompleted(int request_id, | 67 virtual bool OnResponseCompleted(int request_id, |
68 const net::URLRequestStatus& status, | 68 const net::URLRequestStatus& status, |
69 const std::string& security_info) OVERRIDE; | 69 const std::string& security_info) OVERRIDE; |
70 virtual void OnRequestClosed() OVERRIDE; | 70 virtual void OnRequestClosed() OVERRIDE; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Timer to abort the safe browsing check if it takes too long. | 145 // Timer to abort the safe browsing check if it takes too long. |
146 base::OneShotTimer<SafeBrowsingResourceHandler> timer_; | 146 base::OneShotTimer<SafeBrowsingResourceHandler> timer_; |
147 | 147 |
148 // The redirect chain for this resource | 148 // The redirect chain for this resource |
149 std::vector<GURL> redirect_urls_; | 149 std::vector<GURL> redirect_urls_; |
150 | 150 |
151 // Details on the deferred request (either a start or redirect). It is only | 151 // Details on the deferred request (either a start or redirect). It is only |
152 // valid to access these members when defer_state_ != DEFERRED_NONE. | 152 // valid to access these members when defer_state_ != DEFERRED_NONE. |
153 GURL deferred_url_; | 153 GURL deferred_url_; |
154 int deferred_request_id_; | 154 int deferred_request_id_; |
155 scoped_refptr<ResourceResponse> deferred_redirect_response_; | 155 scoped_refptr<content::ResourceResponse> deferred_redirect_response_; |
156 | 156 |
157 scoped_refptr<ResourceHandler> next_handler_; | 157 scoped_refptr<ResourceHandler> next_handler_; |
158 int render_process_host_id_; | 158 int render_process_host_id_; |
159 int render_view_id_; | 159 int render_view_id_; |
160 scoped_refptr<SafeBrowsingService> safe_browsing_; | 160 scoped_refptr<SafeBrowsingService> safe_browsing_; |
161 ResourceDispatcherHost* rdh_; | 161 ResourceDispatcherHost* rdh_; |
162 bool is_subresource_; | 162 bool is_subresource_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); | 164 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); |
165 }; | 165 }; |
166 | 166 |
167 | 167 |
168 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 168 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
OLD | NEW |