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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 321283002: Clear SDCH information on "Clear browsing data" path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comment. Created 6 years, 6 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 | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index da2bb2f5c84dc5b49353b26421ec3a47ccc3dcc6..7b69578bf4b8e5c591896b3f0774d9f436a957a1 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -75,6 +75,7 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "net/base/net_errors.h"
+#include "net/base/sdch_manager.h"
#include "net/cookies/cookie_store.h"
#include "net/disk_cache/disk_cache.h"
#include "net/http/http_cache.h"
@@ -929,6 +930,16 @@ void BrowsingDataRemover::DoClearCache(int rv) {
// Clear QUIC server information from memory and the disk cache.
http_cache->GetSession()->quic_stream_factory()->
ClearCachedStatesInCryptoConfig();
+
+ // Clear SDCH dictionary state.
+ net::SdchManager* sdch_manager =
+ getter->GetURLRequestContext()->sdch_manager();
+ if (sdch_manager)
+ // The test is probably overkill, since chrome should always
sky 2014/06/12 19:46:44 nit: Comments generally come before the code in qu
Randy Smith (Not in Mondays) 2014/06/12 22:18:45 Done.
+ // have an SdchManager. But in general the URLRequestContext
+ // is *not* guaranteed to have an SdchManager, so checking is wise.
+ sdch_manager->ClearData();
+
rv = http_cache->GetBackend(
&cache_, base::Bind(&BrowsingDataRemover::DoClearCache,
base::Unretained(this)));
« no previous file with comments | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698