OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 return handled; | 972 return handled; |
973 } | 973 } |
974 | 974 |
975 void ResourceDispatcherHostImpl::OnRequestResource( | 975 void ResourceDispatcherHostImpl::OnRequestResource( |
976 int routing_id, | 976 int routing_id, |
977 int request_id, | 977 int request_id, |
978 const ResourceHostMsg_Request& request_data) { | 978 const ResourceHostMsg_Request& request_data) { |
979 // When logging time-to-network only care about main frame and non-transfer | 979 // When logging time-to-network only care about main frame and non-transfer |
980 // navigations. | 980 // navigations. |
981 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME && | 981 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME && |
982 request_data.transferred_request_request_id == -1) { | 982 request_data.transferred_request_request_id == -1 && |
| 983 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 984 switches::kEnableBrowserSideNavigation)) { |
983 BrowserThread::PostTask( | 985 BrowserThread::PostTask( |
984 BrowserThread::UI, | 986 BrowserThread::UI, |
985 FROM_HERE, | 987 FROM_HERE, |
986 base::Bind(&LogResourceRequestTimeOnUI, | 988 base::Bind(&LogResourceRequestTimeOnUI, |
987 TimeTicks::Now(), | 989 TimeTicks::Now(), |
988 filter_->child_id(), | 990 filter_->child_id(), |
989 request_data.render_frame_id, | 991 request_data.render_frame_id, |
990 request_data.url)); | 992 request_data.url)); |
991 } | 993 } |
992 BeginRequest(request_id, request_data, NULL, routing_id); | 994 BeginRequest(request_id, request_data, NULL, routing_id); |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 | 2369 |
2368 // Add a flag to selectively bypass the data reduction proxy if the resource | 2370 // Add a flag to selectively bypass the data reduction proxy if the resource |
2369 // type is not an image. | 2371 // type is not an image. |
2370 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2372 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) |
2371 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2373 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
2372 | 2374 |
2373 return load_flags; | 2375 return load_flags; |
2374 } | 2376 } |
2375 | 2377 |
2376 } // namespace content | 2378 } // namespace content |
OLD | NEW |