Chromium Code Reviews| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 child_id, | 486 child_id, |
| 487 route_id, | 487 route_id, |
| 488 this); | 488 this); |
| 489 } | 489 } |
| 490 | 490 |
| 491 // Insert a buffered event handler before the actual one. | 491 // Insert a buffered event handler before the actual one. |
| 492 handler = new BufferedResourceHandler(handler, this, request); | 492 handler = new BufferedResourceHandler(handler, this, request); |
| 493 | 493 |
| 494 // Insert safe browsing at the front of the chain, so it gets to decide | 494 // Insert safe browsing at the front of the chain, so it gets to decide |
| 495 // on policies first. | 495 // on policies first. |
| 496 if (safe_browsing_->enabled()) { | 496 if (safe_browsing_->enabled()) |
|
cbentzel
2011/02/22 15:56:04
Nit: move back to braces, since the if case is mul
gavinp
2011/02/22 22:51:33
Done.
| |
| 497 handler = CreateSafeBrowsingResourceHandler(handler, child_id, route_id, | 497 handler = CreateSafeBrowsingResourceHandler(handler, child_id, route_id, |
| 498 request_data.resource_type); | 498 request_data.resource_type); |
| 499 } | |
| 500 | 499 |
| 501 #if defined(OS_CHROMEOS) | 500 #if defined(OS_CHROMEOS) |
| 502 // We check offline first, then check safe browsing so that we still can block | 501 // We check offline first, then check safe browsing so that we still can block |
| 503 // unsafe site after we remove offline page. | 502 // unsafe site after we remove offline page. |
| 504 handler = | 503 handler = |
| 505 new OfflineResourceHandler(handler, child_id, route_id, this, request); | 504 new OfflineResourceHandler(handler, child_id, route_id, this, request); |
| 506 #endif | 505 #endif |
| 507 | 506 |
| 508 // Make extra info and read footer (contains request ID). | 507 // Make extra info and read footer (contains request ID). |
| 509 ResourceDispatcherHostRequestInfo* extra_info = | 508 ResourceDispatcherHostRequestInfo* extra_info = |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1943 return is_prefetch_enabled_; | 1942 return is_prefetch_enabled_; |
| 1944 } | 1943 } |
| 1945 | 1944 |
| 1946 // static | 1945 // static |
| 1947 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { | 1946 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { |
| 1948 is_prefetch_enabled_ = value; | 1947 is_prefetch_enabled_ = value; |
| 1949 } | 1948 } |
| 1950 | 1949 |
| 1951 // static | 1950 // static |
| 1952 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; | 1951 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; |
| OLD | NEW |