| OLD | NEW |
| 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/debug/dump_without_crashing.h" | 9 #include "base/debug/dump_without_crashing.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "content/browser/browsing_data/clear_site_data_throttle.h" | |
| 12 #include "content/browser/child_process_security_policy_impl.h" | 11 #include "content/browser/child_process_security_policy_impl.h" |
| 13 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 12 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 14 #include "content/browser/frame_host/frame_tree_node.h" | 13 #include "content/browser/frame_host/frame_tree_node.h" |
| 15 #include "content/browser/frame_host/navigator.h" | 14 #include "content/browser/frame_host/navigator.h" |
| 16 #include "content/browser/frame_host/navigator_delegate.h" | 15 #include "content/browser/frame_host/navigator_delegate.h" |
| 17 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 16 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 18 #include "content/browser/service_worker/service_worker_navigation_handle.h" | 17 #include "content/browser/service_worker/service_worker_navigation_handle.h" |
| 19 #include "content/common/frame_messages.h" | 18 #include "content/common/frame_messages.h" |
| 20 #include "content/common/resource_request_body_impl.h" | 19 #include "content/common/resource_request_body_impl.h" |
| 21 #include "content/common/site_isolation_policy.h" | 20 #include "content/common/site_isolation_policy.h" |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 // GetNavigationThrottles is not assigned to throttles_ directly because it | 727 // GetNavigationThrottles is not assigned to throttles_ directly because it |
| 729 // would overwrite any throttle previously added with | 728 // would overwrite any throttle previously added with |
| 730 // RegisterThrottleForTesting. | 729 // RegisterThrottleForTesting. |
| 731 ScopedVector<NavigationThrottle> throttles_to_register = | 730 ScopedVector<NavigationThrottle> throttles_to_register = |
| 732 GetDelegate()->CreateThrottlesForNavigation(this); | 731 GetDelegate()->CreateThrottlesForNavigation(this); |
| 733 std::unique_ptr<NavigationThrottle> devtools_throttle = | 732 std::unique_ptr<NavigationThrottle> devtools_throttle = |
| 734 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); | 733 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); |
| 735 if (devtools_throttle) | 734 if (devtools_throttle) |
| 736 throttles_to_register.push_back(std::move(devtools_throttle)); | 735 throttles_to_register.push_back(std::move(devtools_throttle)); |
| 737 | 736 |
| 738 std::unique_ptr<NavigationThrottle> clear_site_data_throttle = | |
| 739 ClearSiteDataThrottle::CreateThrottleForNavigation(this); | |
| 740 if (clear_site_data_throttle) | |
| 741 throttles_to_register.push_back(std::move(clear_site_data_throttle)); | |
| 742 | |
| 743 if (throttles_to_register.size() > 0) { | 737 if (throttles_to_register.size() > 0) { |
| 744 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), | 738 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), |
| 745 throttles_to_register.end()); | 739 throttles_to_register.end()); |
| 746 throttles_to_register.weak_clear(); | 740 throttles_to_register.weak_clear(); |
| 747 } | 741 } |
| 748 } | 742 } |
| 749 | 743 |
| 750 bool NavigationHandleImpl::WasStartedFromContextMenu() const { | 744 bool NavigationHandleImpl::WasStartedFromContextMenu() const { |
| 751 return started_from_context_menu_; | 745 return started_from_context_menu_; |
| 752 } | 746 } |
| 753 | 747 |
| 754 } // namespace content | 748 } // namespace content |
| OLD | NEW |