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

Unified Diff: content/browser/devtools/protocol/network_handler.cc

Issue 2892953002: Remove the ClearCookies and ClearCache methods from ContentBrowserClient (Closed)
Patch Set: Merge conflict in BUILD.gn -> Rebase Created 3 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/network_handler.cc
diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc
index 2fdccaa8593f65174517d82ffb7413dd93e662a7..62abd9ece33f18a6bb49276e8ef33653c28e7fee 100644
--- a/content/browser/devtools/protocol/network_handler.cc
+++ b/content/browser/devtools/protocol/network_handler.cc
@@ -23,6 +23,7 @@
#include "content/common/resource_request_completion_status.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/browsing_data_remover.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/resource_context.h"
@@ -454,8 +455,15 @@ Response NetworkHandler::Disable() {
}
Response NetworkHandler::ClearBrowserCache() {
- if (host_)
- GetContentClient()->browser()->ClearCache(host_);
+ if (host_) {
+ content::BrowsingDataRemover* remover =
+ content::BrowserContext::GetBrowsingDataRemover(
+ host_->GetSiteInstance()->GetProcess()->GetBrowserContext());
+ remover->Remove(base::Time(), base::Time::Max(),
+ content::BrowsingDataRemover::DATA_TYPE_CACHE,
+ content::BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB);
+ }
+
return Response::OK();
}
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698