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

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

Issue 2630043002: IGNORE: This will not be landed. Uploaded just to run trybots.
Patch Set: Changed throttle registration order. Created 3 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 | « no previous file | 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 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 <iterator> 7 #include <iterator>
8 8
9 #include "base/debug/dump_without_crashing.h" 9 #include "base/debug/dump_without_crashing.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 } 814 }
815 815
816 void NavigationHandleImpl::RegisterNavigationThrottles() { 816 void NavigationHandleImpl::RegisterNavigationThrottles() {
817 // Register the navigation throttles. The vector returned by 817 // Register the navigation throttles. The vector returned by
818 // GetNavigationThrottles is not assigned to throttles_ directly because it 818 // GetNavigationThrottles is not assigned to throttles_ directly because it
819 // would overwrite any throttles previously added with 819 // would overwrite any throttles previously added with
820 // RegisterThrottleForTesting. 820 // RegisterThrottleForTesting.
821 std::vector<std::unique_ptr<NavigationThrottle>> throttles_to_register = 821 std::vector<std::unique_ptr<NavigationThrottle>> throttles_to_register =
822 GetDelegate()->CreateThrottlesForNavigation(this); 822 GetDelegate()->CreateThrottlesForNavigation(this);
823 823
824 std::unique_ptr<NavigationThrottle> mixed_content_throttle =
825 MixedContentNavigationThrottle::CreateThrottleForNavigation(this);
826 if (mixed_content_throttle)
827 throttles_to_register.push_back(std::move(mixed_content_throttle));
828
829 std::unique_ptr<NavigationThrottle> devtools_throttle = 824 std::unique_ptr<NavigationThrottle> devtools_throttle =
830 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); 825 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this);
831 if (devtools_throttle) 826 if (devtools_throttle)
832 throttles_to_register.push_back(std::move(devtools_throttle)); 827 throttles_to_register.push_back(std::move(devtools_throttle));
833 828
834 std::unique_ptr<NavigationThrottle> clear_site_data_throttle = 829 std::unique_ptr<NavigationThrottle> clear_site_data_throttle =
835 ClearSiteDataThrottle::CreateThrottleForNavigation(this); 830 ClearSiteDataThrottle::CreateThrottleForNavigation(this);
836 if (clear_site_data_throttle) 831 if (clear_site_data_throttle)
837 throttles_to_register.push_back(std::move(clear_site_data_throttle)); 832 throttles_to_register.push_back(std::move(clear_site_data_throttle));
838 833
839 std::unique_ptr<content::NavigationThrottle> ancestor_throttle = 834 std::unique_ptr<content::NavigationThrottle> ancestor_throttle =
840 content::AncestorThrottle::MaybeCreateThrottleFor(this); 835 content::AncestorThrottle::MaybeCreateThrottleFor(this);
841 if (ancestor_throttle) 836 if (ancestor_throttle)
842 throttles_.push_back(std::move(ancestor_throttle)); 837 throttles_.push_back(std::move(ancestor_throttle));
843 838
839 std::unique_ptr<NavigationThrottle> mixed_content_throttle =
840 MixedContentNavigationThrottle::CreateThrottleForNavigation(this);
841 if (mixed_content_throttle)
842 throttles_to_register.push_back(std::move(mixed_content_throttle));
843
844 throttles_.insert(throttles_.begin(), 844 throttles_.insert(throttles_.begin(),
845 std::make_move_iterator(throttles_to_register.begin()), 845 std::make_move_iterator(throttles_to_register.begin()),
846 std::make_move_iterator(throttles_to_register.end())); 846 std::make_move_iterator(throttles_to_register.end()));
847 } 847 }
848 848
849 } // namespace content 849 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698