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

Side by Side Diff: components/browsing_data/storage_partition_http_cache_data_remover.cc

Issue 2097043002: Clear HTTP auth data on clearing browsing data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete within time period + delete with cookies and passwords Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/browsing_data/storage_partition_http_cache_data_remover.h" 5 #include "components/browsing_data/storage_partition_http_cache_data_remover.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "components/browsing_data/conditional_cache_deletion_helper.h" 10 #include "components/browsing_data/conditional_cache_deletion_helper.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ? main_context_getter_.get() 145 ? main_context_getter_.get()
146 : media_context_getter_.get(); 146 : media_context_getter_.get();
147 net::HttpCache* http_cache = getter->GetURLRequestContext() 147 net::HttpCache* http_cache = getter->GetURLRequestContext()
148 ->http_transaction_factory() 148 ->http_transaction_factory()
149 ->GetCache(); 149 ->GetCache();
150 150
151 next_cache_state_ = (next_cache_state_ == STATE_CREATE_MAIN) 151 next_cache_state_ = (next_cache_state_ == STATE_CREATE_MAIN)
152 ? STATE_PROCESS_MAIN 152 ? STATE_PROCESS_MAIN
153 : STATE_PROCESS_MEDIA; 153 : STATE_PROCESS_MEDIA;
154 154
155 // Clear HTTP auth data.
156 net::HttpNetworkSession* http_session = getter->GetURLRequestContext()
157 ->http_transaction_factory()
158 ->GetSession();
159 if (http_session)
160 http_session->http_auth_cache()->Clear(delete_begin_, delete_end_);
161
155 // Clear QUIC server information from memory and the disk cache. 162 // Clear QUIC server information from memory and the disk cache.
156 http_cache->GetSession() 163 http_cache->GetSession()
157 ->quic_stream_factory() 164 ->quic_stream_factory()
158 ->ClearCachedStatesInCryptoConfig(); 165 ->ClearCachedStatesInCryptoConfig();
159 166
160 // Clear SDCH dictionary state. 167 // Clear SDCH dictionary state.
161 net::SdchManager* sdch_manager = 168 net::SdchManager* sdch_manager =
162 getter->GetURLRequestContext()->sdch_manager(); 169 getter->GetURLRequestContext()->sdch_manager();
163 // The test is probably overkill, since chrome should always have an 170 // The test is probably overkill, since chrome should always have an
164 // SdchManager. But in general the URLRequestContext is *not* 171 // SdchManager. But in general the URLRequestContext is *not*
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 default: { 308 default: {
302 NOTREACHED() << "bad state"; 309 NOTREACHED() << "bad state";
303 next_cache_state_ = STATE_NONE; // Stop looping. 310 next_cache_state_ = STATE_NONE; // Stop looping.
304 return; 311 return;
305 } 312 }
306 } 313 }
307 } 314 }
308 } 315 }
309 316
310 } // namespace browsing_data 317 } // namespace browsing_data
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698