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

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: Many changes, most importantly synchronous deletion. Created 4 years, 4 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 7857c9631ee6d4119acecc79dd5efa5bf55e1809..a572cc8c3af4821f5144f4f92e1aff4e623def85 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/logging.h"
+#include "content/browser/browsing_data/clear_site_data_throttle.h"
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigator.h"
@@ -558,6 +559,11 @@ void NavigationHandleImpl::RegisterNavigationThrottles() {
if (devtools_throttle)
throttles_to_register.push_back(devtools_throttle.release());
+ std::unique_ptr<NavigationThrottle> clear_site_data_throttle =
+ ClearSiteDataThrottle::CreateThrottleForNavigation(this);
+ if (clear_site_data_throttle)
+ 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!
+
if (throttles_to_register.size() > 0) {
throttles_.insert(throttles_.begin(), throttles_to_register.begin(),
throttles_to_register.end());

Powered by Google App Engine
This is Rietveld 408576698