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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/sdch_dictionary_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "content/public/browser/browser_thread.h" 68 #include "content/public/browser/browser_thread.h"
69 #include "content/public/browser/dom_storage_context.h" 69 #include "content/public/browser/dom_storage_context.h"
70 #include "content/public/browser/download_manager.h" 70 #include "content/public/browser/download_manager.h"
71 #include "content/public/browser/local_storage_usage_info.h" 71 #include "content/public/browser/local_storage_usage_info.h"
72 #include "content/public/browser/notification_service.h" 72 #include "content/public/browser/notification_service.h"
73 #include "content/public/browser/plugin_data_remover.h" 73 #include "content/public/browser/plugin_data_remover.h"
74 #include "content/public/browser/session_storage_usage_info.h" 74 #include "content/public/browser/session_storage_usage_info.h"
75 #include "content/public/browser/storage_partition.h" 75 #include "content/public/browser/storage_partition.h"
76 #include "content/public/browser/user_metrics.h" 76 #include "content/public/browser/user_metrics.h"
77 #include "net/base/net_errors.h" 77 #include "net/base/net_errors.h"
78 #include "net/base/sdch_manager.h"
78 #include "net/cookies/cookie_store.h" 79 #include "net/cookies/cookie_store.h"
79 #include "net/disk_cache/disk_cache.h" 80 #include "net/disk_cache/disk_cache.h"
80 #include "net/http/http_cache.h" 81 #include "net/http/http_cache.h"
81 #include "net/http/transport_security_state.h" 82 #include "net/http/transport_security_state.h"
82 #include "net/ssl/server_bound_cert_service.h" 83 #include "net/ssl/server_bound_cert_service.h"
83 #include "net/ssl/server_bound_cert_store.h" 84 #include "net/ssl/server_bound_cert_store.h"
84 #include "net/url_request/url_request_context.h" 85 #include "net/url_request/url_request_context.h"
85 #include "net/url_request/url_request_context_getter.h" 86 #include "net/url_request/url_request_context_getter.h"
86 #include "webkit/browser/quota/quota_manager.h" 87 #include "webkit/browser/quota/quota_manager.h"
87 #include "webkit/browser/quota/special_storage_policy.h" 88 #include "webkit/browser/quota/special_storage_policy.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 net::HttpCache* http_cache = 923 net::HttpCache* http_cache =
923 getter->GetURLRequestContext()->http_transaction_factory()-> 924 getter->GetURLRequestContext()->http_transaction_factory()->
924 GetCache(); 925 GetCache();
925 926
926 next_cache_state_ = (next_cache_state_ == STATE_CREATE_MAIN) ? 927 next_cache_state_ = (next_cache_state_ == STATE_CREATE_MAIN) ?
927 STATE_DELETE_MAIN : STATE_DELETE_MEDIA; 928 STATE_DELETE_MAIN : STATE_DELETE_MEDIA;
928 929
929 // Clear QUIC server information from memory and the disk cache. 930 // Clear QUIC server information from memory and the disk cache.
930 http_cache->GetSession()->quic_stream_factory()-> 931 http_cache->GetSession()->quic_stream_factory()->
931 ClearCachedStatesInCryptoConfig(); 932 ClearCachedStatesInCryptoConfig();
933
934 // Clear SDCH dictionary state.
935 net::SdchManager* sdch_manager =
936 getter->GetURLRequestContext()->sdch_manager();
937 if (sdch_manager)
938 // 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.
939 // have an SdchManager. But in general the URLRequestContext
940 // is *not* guaranteed to have an SdchManager, so checking is wise.
941 sdch_manager->ClearData();
942
932 rv = http_cache->GetBackend( 943 rv = http_cache->GetBackend(
933 &cache_, base::Bind(&BrowsingDataRemover::DoClearCache, 944 &cache_, base::Bind(&BrowsingDataRemover::DoClearCache,
934 base::Unretained(this))); 945 base::Unretained(this)));
935 break; 946 break;
936 } 947 }
937 case STATE_DELETE_MAIN: 948 case STATE_DELETE_MAIN:
938 case STATE_DELETE_MEDIA: { 949 case STATE_DELETE_MEDIA: {
939 next_cache_state_ = (next_cache_state_ == STATE_DELETE_MAIN) ? 950 next_cache_state_ = (next_cache_state_ == STATE_DELETE_MAIN) ?
940 STATE_CREATE_MEDIA : STATE_DONE; 951 STATE_CREATE_MEDIA : STATE_DONE;
941 952
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 waiting_for_clear_webrtc_logs_ = false; 1157 waiting_for_clear_webrtc_logs_ = false;
1147 NotifyAndDeleteIfDone(); 1158 NotifyAndDeleteIfDone();
1148 } 1159 }
1149 #endif 1160 #endif
1150 1161
1151 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1162 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1153 waiting_for_clear_domain_reliability_monitor_ = false; 1164 waiting_for_clear_domain_reliability_monitor_ = false;
1154 NotifyAndDeleteIfDone(); 1165 NotifyAndDeleteIfDone();
1155 } 1166 }
OLDNEW
« 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