OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/renderer_host/safe_browsing_resource_handler.h" | 5 #include "chrome/browser/renderer_host/safe_browsing_resource_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/renderer_host/global_request_id.h" | 8 #include "chrome/browser/renderer_host/global_request_id.h" |
9 #include "chrome/browser/renderer_host/render_message_filter.h" | 9 #include "chrome/browser/renderer_host/render_message_filter.h" |
10 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 10 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
11 #include "chrome/common/notification_service.h" | 11 #include "chrome/common/notification_source.h" |
12 #include "chrome/common/resource_response.h" | 12 #include "chrome/common/resource_response.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 | 15 |
16 // Maximum time in milliseconds to wait for the safe browsing service to | 16 // Maximum time in milliseconds to wait for the safe browsing service to |
17 // verify a URL. After this amount of time the outstanding check will be | 17 // verify a URL. After this amount of time the outstanding check will be |
18 // aborted, and the URL will be treated as if it were safe. | 18 // aborted, and the URL will be treated as if it were safe. |
19 static const int kCheckUrlTimeoutMs = 5000; | 19 static const int kCheckUrlTimeoutMs = 5000; |
20 | 20 |
21 // TODO(eroman): Downgrade these CHECK()s to DCHECKs once there is more | 21 // TODO(eroman): Downgrade these CHECK()s to DCHECKs once there is more |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 rdh_->FollowDeferredRedirect(render_process_host_id_, request_id, | 305 rdh_->FollowDeferredRedirect(render_process_host_id_, request_id, |
306 false, GURL()); | 306 false, GURL()); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 void SafeBrowsingResourceHandler::ClearDeferredRequestInfo() { | 310 void SafeBrowsingResourceHandler::ClearDeferredRequestInfo() { |
311 deferred_request_id_ = -1; | 311 deferred_request_id_ = -1; |
312 deferred_url_ = GURL(); | 312 deferred_url_ = GURL(); |
313 deferred_redirect_response_ = NULL; | 313 deferred_redirect_response_ = NULL; |
314 } | 314 } |
OLD | NEW |