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

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: Rebase. Created 4 years, 12 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
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(
286 "navigation", "Navigation timeToNetworkStack", navigation_handle_.get(),
287 timestamp.ToInternalValue());
288 }
clamy 2015/12/22 10:55:23 nit: skip one line after }.
carlosk 2015/12/22 13:58:18 Done.
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 browser_context, navigating_frame_host->GetSiteInstance()); 348 browser_context, navigating_frame_host->GetSiteInstance());
344 DCHECK(partition); 349 DCHECK(partition);
345 350
346 ServiceWorkerContextWrapper* service_worker_context = 351 ServiceWorkerContextWrapper* service_worker_context =
347 static_cast<ServiceWorkerContextWrapper*>( 352 static_cast<ServiceWorkerContextWrapper*>(
348 partition->GetServiceWorkerContext()); 353 partition->GetServiceWorkerContext());
349 navigation_handle_->InitServiceWorkerHandle(service_worker_context); 354 navigation_handle_->InitServiceWorkerHandle(service_worker_context);
350 } 355 }
351 356
352 } // namespace content 357 } // 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