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

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 1532873003: PlzNavigate: add initial traces for new TBM benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/frame_host/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/frame_tree_node.h" 8 #include "content/browser/frame_host/frame_tree_node.h"
9 #include "content/browser/frame_host/navigation_controller_impl.h" 9 #include "content/browser/frame_host/navigation_controller_impl.h"
10 #include "content/browser/frame_host/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache, 274 void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
275 int net_error) { 275 int net_error) {
276 DCHECK(state_ == STARTED); 276 DCHECK(state_ == STARTED);
277 state_ = FAILED; 277 state_ = FAILED;
278 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error)); 278 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error));
279 frame_tree_node_->navigator()->FailedNavigation( 279 frame_tree_node_->navigator()->FailedNavigation(
280 frame_tree_node_, has_stale_copy_in_cache, net_error); 280 frame_tree_node_, has_stale_copy_in_cache, net_error);
281 } 281 }
282 282
283 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 283 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
284 if (frame_tree_node_->IsMainFrame()) {
285 TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0(
clamy 2015/12/18 15:42:11 I'm not sure about the naming of the measurement -
carlosk 2015/12/18 17:23:21 Looking at the code this is triggered from, it hap
clamy 2015/12/21 10:43:32 I'm fine with the measurement happening when it ha
carlosk 2015/12/21 11:19:25 Done.
286 "navigation", "Navigation timeToIOStart", navigation_handle_.get(),
287 timestamp.ToInternalValue());
288 }
284 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 289 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
285 common_params_.url); 290 common_params_.url);
286 } 291 }
287 292
288 void NavigationRequest::OnStartChecksComplete( 293 void NavigationRequest::OnStartChecksComplete(
289 NavigationThrottle::ThrottleCheckResult result) { 294 NavigationThrottle::ThrottleCheckResult result) {
290 CHECK(result != NavigationThrottle::DEFER); 295 CHECK(result != NavigationThrottle::DEFER);
291 296
292 // Abort the request if needed. This will destroy the NavigationRequest. 297 // Abort the request if needed. This will destroy the NavigationRequest.
293 if (result == NavigationThrottle::CANCEL_AND_IGNORE || 298 if (result == NavigationThrottle::CANCEL_AND_IGNORE ||
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 browser_context, navigating_frame_host->GetSiteInstance()); 347 browser_context, navigating_frame_host->GetSiteInstance());
343 DCHECK(partition); 348 DCHECK(partition);
344 349
345 ServiceWorkerContextWrapper* service_worker_context = 350 ServiceWorkerContextWrapper* service_worker_context =
346 static_cast<ServiceWorkerContextWrapper*>( 351 static_cast<ServiceWorkerContextWrapper*>(
347 partition->GetServiceWorkerContext()); 352 partition->GetServiceWorkerContext());
348 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 353 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
349 } 354 }
350 355
351 } // namespace content 356 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | content/browser/frame_host/navigator_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698