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

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

Issue 2368923003: Support the Clear-Site-Data header on resource requests (Closed)
Patch Set: Created 4 years, 2 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/browsing_data/clear_site_data_throttle.h"
11 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 10 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
12 #include "content/browser/frame_host/frame_tree_node.h" 11 #include "content/browser/frame_host/frame_tree_node.h"
13 #include "content/browser/frame_host/navigator.h" 12 #include "content/browser/frame_host/navigator.h"
14 #include "content/browser/frame_host/navigator_delegate.h" 13 #include "content/browser/frame_host/navigator_delegate.h"
15 #include "content/browser/service_worker/service_worker_context_wrapper.h" 14 #include "content/browser/service_worker/service_worker_context_wrapper.h"
16 #include "content/common/frame_messages.h" 15 #include "content/common/frame_messages.h"
17 #include "content/common/resource_request_body_impl.h" 16 #include "content/common/resource_request_body_impl.h"
18 #include "content/public/browser/content_browser_client.h" 17 #include "content/public/browser/content_browser_client.h"
19 #include "content/public/common/browser_side_navigation_policy.h" 18 #include "content/public/common/browser_side_navigation_policy.h"
20 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // GetNavigationThrottles is not assigned to throttles_ directly because it 586 // GetNavigationThrottles is not assigned to throttles_ directly because it
588 // would overwrite any throttle previously added with 587 // would overwrite any throttle previously added with
589 // RegisterThrottleForTesting. 588 // RegisterThrottleForTesting.
590 ScopedVector<NavigationThrottle> throttles_to_register = 589 ScopedVector<NavigationThrottle> throttles_to_register =
591 GetContentClient()->browser()->CreateThrottlesForNavigation(this); 590 GetContentClient()->browser()->CreateThrottlesForNavigation(this);
592 std::unique_ptr<NavigationThrottle> devtools_throttle = 591 std::unique_ptr<NavigationThrottle> devtools_throttle =
593 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this); 592 RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this);
594 if (devtools_throttle) 593 if (devtools_throttle)
595 throttles_to_register.push_back(std::move(devtools_throttle)); 594 throttles_to_register.push_back(std::move(devtools_throttle));
596 595
597 std::unique_ptr<NavigationThrottle> clear_site_data_throttle =
598 ClearSiteDataThrottle::CreateThrottleForNavigation(this);
599 if (clear_site_data_throttle)
600 throttles_to_register.push_back(std::move(clear_site_data_throttle));
601
602 if (throttles_to_register.size() > 0) { 596 if (throttles_to_register.size() > 0) {
603 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), 597 throttles_.insert(throttles_.begin(), throttles_to_register.begin(),
604 throttles_to_register.end()); 598 throttles_to_register.end());
605 throttles_to_register.weak_clear(); 599 throttles_to_register.weak_clear();
606 } 600 }
607 } 601 }
608 602
609 } // namespace content 603 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698