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

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

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on #408334 Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 10 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // destruction. 545 // destruction.
546 } 546 }
547 547
548 void NavigationHandleImpl::RegisterNavigationThrottles() { 548 void NavigationHandleImpl::RegisterNavigationThrottles() {
549 // Register the navigation throttles. The ScopedVector returned by 549 // Register the navigation throttles. The ScopedVector returned by
550 // GetNavigationThrottles is not assigned to throttles_ directly because it 550 // GetNavigationThrottles is not assigned to throttles_ directly because it
551 // would overwrite any throttle previously added with 551 // would overwrite any throttle previously added with
552 // RegisterThrottleForTesting. 552 // RegisterThrottleForTesting.
553 ScopedVector<NavigationThrottle> throttles_to_register = 553 ScopedVector<NavigationThrottle> throttles_to_register =
554 GetContentClient()->browser()->CreateThrottlesForNavigation(this); 554 GetContentClient()->browser()->CreateThrottlesForNavigation(this);
555 std::unique_ptr<NavigationThrottle> devtools_throttle =
556 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this);
nasko 2016/08/01 15:29:23 This throttle was added at the end of the list int
Charlie Harrison 2016/08/01 17:42:19 It is still at the end of the "real" throttles. Th
nasko 2016/08/01 23:38:11 If it has no effect, then what necessitated the ch
Charlie Harrison 2016/08/02 13:09:14 The code moves the test navigation throttles to th
557 if (devtools_throttle)
558 throttles_to_register.push_back(devtools_throttle.release());
559
555 if (throttles_to_register.size() > 0) { 560 if (throttles_to_register.size() > 0) {
556 throttles_.insert(throttles_.end(), throttles_to_register.begin(), 561 throttles_.insert(throttles_.begin(), throttles_to_register.begin(),
557 throttles_to_register.end()); 562 throttles_to_register.end());
558 throttles_to_register.weak_clear(); 563 throttles_to_register.weak_clear();
559 } 564 }
560 std::unique_ptr<NavigationThrottle> devtools_throttle =
561 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this);
562 if (devtools_throttle)
563 throttles_.push_back(devtools_throttle.release());
564 } 565 }
565 566
566 } // namespace content 567 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698