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

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

Issue 2359503002: Let TRACE_EVENT_XXX_WITH_TIMESTAMP accept TimeTicks instead of int64_t (Closed)
Patch Set: Rebase Created 4 years, 3 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 <utility> 7 #include <utility>
8 8
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 state_ = FAILED; 343 state_ = FAILED;
344 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error)); 344 navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error));
345 frame_tree_node_->navigator()->FailedNavigation( 345 frame_tree_node_->navigator()->FailedNavigation(
346 frame_tree_node_, has_stale_copy_in_cache, net_error); 346 frame_tree_node_, has_stale_copy_in_cache, net_error);
347 } 347 }
348 348
349 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) { 349 void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
350 if (frame_tree_node_->IsMainFrame()) { 350 if (frame_tree_node_->IsMainFrame()) {
351 TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0( 351 TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0(
352 "navigation", "Navigation timeToNetworkStack", navigation_handle_.get(), 352 "navigation", "Navigation timeToNetworkStack", navigation_handle_.get(),
353 timestamp.ToInternalValue()); 353 timestamp);
354 } 354 }
355 355
356 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp, 356 frame_tree_node_->navigator()->LogResourceRequestTime(timestamp,
357 common_params_.url); 357 common_params_.url);
358 } 358 }
359 359
360 void NavigationRequest::OnServiceWorkerEncountered() { 360 void NavigationRequest::OnServiceWorkerEncountered() {
361 request_params_.should_create_service_worker = true; 361 request_params_.should_create_service_worker = true;
362 362
363 // TODO(clamy): the navigation should be sent to a RenderFrameHost to be 363 // TODO(clamy): the navigation should be sent to a RenderFrameHost to be
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 TransferNavigationHandleOwnership(render_frame_host); 472 TransferNavigationHandleOwnership(render_frame_host);
473 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 473 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
474 common_params_, request_params_, 474 common_params_, request_params_,
475 is_view_source_); 475 is_view_source_);
476 476
477 frame_tree_node_->ResetNavigationRequest(true); 477 frame_tree_node_->ResetNavigationRequest(true);
478 } 478 }
479 479
480 } // namespace content 480 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698