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

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.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: 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: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index dced9a4180afcdbf276f30a35115710bc4093fe8..3f3b125e24073214a4a41091d0eade0d06449b96 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -17,6 +17,7 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browsing_data/clear_site_data_throttle.h"
Mike West 2016/05/31 05:35:52 All the throttle machinery should be in //content,
msramek 2016/06/01 14:20:41 Done. Moved to content. It actually made some thin
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/component_updater/component_updater_resource_throttle.h"
#include "chrome/browser/download/download_request_limiter.h"
@@ -618,6 +619,10 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
if (ThreadHopResourceThrottle::IsEnabled())
throttles->push_back(new ThreadHopResourceThrottle);
+
+ // Experimental Clear-Site-Data throttle. Create only for the main frame.
Mike West 2016/05/31 05:35:52 This is fine to start with, but an eventual goal s
msramek 2016/06/01 14:20:41 I removed the condition for now. My intention was
+ if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME)
+ throttles->push_back(new ClearSiteDataThrottle(request));
}
bool ChromeResourceDispatcherHostDelegate::ShouldForceDownloadResource(

Powered by Google App Engine
This is Rietveld 408576698