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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2025683003: First experimental implementation of the Clear-Site-Data header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix ListValue iteration. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 240eba7416107135f096249c2f9b94954e080c84..0d11fd4df76d382bc149ee086c91169d191fce22 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "content/browser/browsing_data/clear_site_data_throttle.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_delegate.h"
@@ -304,7 +305,12 @@ void NavigationHandleImpl::WillStartRequest(
state_ = WILL_SEND_REQUEST;
complete_callback_ = callback;
- // Register the navigation throttles. The ScopedVector returned by
+ // Register the platform's navigation throttles.
+ std::unique_ptr<content::NavigationThrottle> clear_site_data_throttle =
+ content::ClearSiteDataThrottle::CreateThrottleFor(this);
+ throttles_.push_back(std::move(clear_site_data_throttle));
Mike West 2016/06/02 07:00:08 Can you tie the creation of this throttle to the `
msramek 2016/06/14 20:12:08 Done.
+
+ // Register the embedder's navigation throttles. The ScopedVector returned by
// GetNavigationThrottles is not assigned to throttles_ directly because it
// would overwrite any throttle previously added with
// RegisterThrottleForTesting.

Powered by Google App Engine
This is Rietveld 408576698