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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2368923003: Support the Clear-Site-Data header on resource requests (Closed)
Patch Set: Addressed comments. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 14bfe1749fb58250ddd77a038091b436aa48b309..c55f14f87a4f3bbd571aa2e03cea665b5bc3bd11 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -37,6 +37,7 @@
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/bad_message.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
+#include "content/browser/browsing_data/clear_site_data_throttle.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/navigation_handle_impl.h"
@@ -1664,6 +1665,12 @@ ResourceDispatcherHostImpl::AddStandardHandlers(
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
}
+ // The experimental Clear-Site-Data throttle.
+ std::unique_ptr<ResourceThrottle> clear_site_data_throttle =
+ ClearSiteDataThrottle::CreateThrottleForRequest(request);
+ if (clear_site_data_throttle)
+ throttles.push_back(clear_site_data_throttle.release());
+
// TODO(ricea): Stop looking this up so much.
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
throttles.push_back(scheduler_->ScheduleRequest(child_id, route_id,

Powered by Google App Engine
This is Rietveld 408576698