Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 874353003: New TimeToFirstURLJob* navigation metrics now work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final method name change. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698