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/logging.h" | 9 #include "base/logging.h" |
10 #include "content/browser/browsing_data/clear_site_data_throttle.h" | |
10 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 11 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
11 #include "content/browser/frame_host/frame_tree_node.h" | 12 #include "content/browser/frame_host/frame_tree_node.h" |
12 #include "content/browser/frame_host/navigator.h" | 13 #include "content/browser/frame_host/navigator.h" |
13 #include "content/browser/frame_host/navigator_delegate.h" | 14 #include "content/browser/frame_host/navigator_delegate.h" |
14 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 15 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
15 #include "content/common/frame_messages.h" | 16 #include "content/common/frame_messages.h" |
16 #include "content/common/resource_request_body_impl.h" | 17 #include "content/common/resource_request_body_impl.h" |
17 #include "content/public/browser/content_browser_client.h" | 18 #include "content/public/browser/content_browser_client.h" |
18 #include "content/public/common/browser_side_navigation_policy.h" | 19 #include "content/public/common/browser_side_navigation_policy.h" |
19 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
551 // GetNavigationThrottles is not assigned to throttles_ directly because it | 552 // GetNavigationThrottles is not assigned to throttles_ directly because it |
552 // would overwrite any throttle previously added with | 553 // would overwrite any throttle previously added with |
553 // RegisterThrottleForTesting. | 554 // RegisterThrottleForTesting. |
554 ScopedVector<NavigationThrottle> throttles_to_register = | 555 ScopedVector<NavigationThrottle> throttles_to_register = |
555 GetContentClient()->browser()->CreateThrottlesForNavigation(this); | 556 GetContentClient()->browser()->CreateThrottlesForNavigation(this); |
556 std::unique_ptr<NavigationThrottle> devtools_throttle = | 557 std::unique_ptr<NavigationThrottle> devtools_throttle = |
557 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); | 558 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); |
558 if (devtools_throttle) | 559 if (devtools_throttle) |
559 throttles_to_register.push_back(devtools_throttle.release()); | 560 throttles_to_register.push_back(devtools_throttle.release()); |
560 | 561 |
562 std::unique_ptr<NavigationThrottle> clear_site_data_throttle = | |
563 ClearSiteDataThrottle::CreateThrottleForNavigation(this); | |
564 if (clear_site_data_throttle) | |
565 throttles_to_register.push_back(clear_site_data_throttle.release()); | |
nasko
2016/08/11 20:07:22
nit: std::move(clear_site_data_throttle)
msramek
2016/08/12 15:06:28
Done, also above from where I copy-pasted this.
nasko
2016/08/12 21:44:54
Thanks!
| |
566 | |
561 if (throttles_to_register.size() > 0) { | 567 if (throttles_to_register.size() > 0) { |
562 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), | 568 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), |
563 throttles_to_register.end()); | 569 throttles_to_register.end()); |
564 throttles_to_register.weak_clear(); | 570 throttles_to_register.weak_clear(); |
565 } | 571 } |
566 } | 572 } |
567 | 573 |
568 } // namespace content | 574 } // namespace content |
OLD | NEW |