summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/chrome_benchmarking_message_filter.cc66
-rw-r--r--chrome/browser/chrome_benchmarking_message_filter.h2
-rw-r--r--chrome/browser/io_thread.cc1
3 files changed, 5 insertions, 64 deletions
diff --git a/chrome/browser/chrome_benchmarking_message_filter.cc b/chrome/browser/chrome_benchmarking_message_filter.cc
index 1a44b0b..4e7c5f5 100644
--- a/chrome/browser/chrome_benchmarking_message_filter.cc
+++ b/chrome/browser/chrome_benchmarking_message_filter.cc
@@ -30,57 +30,6 @@ void ClearCacheCallback(ChromeBenchmarkingMessageFilter* filter,
filter->Send(reply_msg);
}
-// Class to assist with clearing out the cache when we want to preserve
-// the sslhostinfo entries. It's not very efficient, but its just for debug.
-class DoomEntriesHelper {
- public:
- explicit DoomEntriesHelper(disk_cache::Backend* backend)
- : backend_(backend),
- entry_(NULL),
- iter_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
- base::Bind(&DoomEntriesHelper::CacheCallback,
- base::Unretained(this)))) {
- }
-
- void ClearCache(const net::CompletionCallback& callback) {
- clear_cache_callback_ = callback;
- return CacheCallback(net::OK); // Start clearing the cache.
- }
-
- const net::CompletionCallback& callback() { return callback_; }
-
- private:
- void CacheCallback(int result) {
- do {
- if (result != net::OK) {
- clear_cache_callback_.Run(result);
- delete this;
- return;
- }
-
- if (entry_) {
- // Doom all entries except those with snapstart information.
- std::string key = entry_->GetKey();
- if (key.find("sslhostinfo:") != 0) {
- entry_->Doom();
- backend_->EndEnumeration(&iter_);
- iter_ = NULL; // We invalidated our iterator - start from the top!
- }
- entry_->Close();
- entry_ = NULL;
- }
- result = backend_->OpenNextEntry(&iter_, &entry_, callback_);
- } while (result != net::ERR_IO_PENDING);
- }
-
- disk_cache::Backend* backend_;
- disk_cache::Entry* entry_;
- void* iter_;
- net::CompletionCallback callback_;
- net::CompletionCallback clear_cache_callback_;
-};
-
} // namespace
ChromeBenchmarkingMessageFilter::ChromeBenchmarkingMessageFilter(
@@ -113,8 +62,7 @@ bool ChromeBenchmarkingMessageFilter::OnMessageReceived(
return handled;
}
-void ChromeBenchmarkingMessageFilter::OnClearCache(bool preserve_ssl_host_info,
- IPC::Message* reply_msg) {
+void ChromeBenchmarkingMessageFilter::OnClearCache(IPC::Message* reply_msg) {
// This function is disabled unless the user has enabled
// benchmarking extensions.
if (!CheckBenchmarkingEnabled()) {
@@ -128,16 +76,10 @@ void ChromeBenchmarkingMessageFilter::OnClearCache(bool preserve_ssl_host_info,
if (backend) {
net::CompletionCallback callback =
base::Bind(&ClearCacheCallback, make_scoped_refptr(this), reply_msg);
- if (preserve_ssl_host_info) {
- DoomEntriesHelper* helper = new DoomEntriesHelper(backend);
- helper->ClearCache(callback); // Will self clean.
+ rv = backend->DoomAllEntries(callback);
+ if (rv == net::ERR_IO_PENDING) {
+ // The callback will send the reply.
return;
- } else {
- rv = backend->DoomAllEntries(callback);
- if (rv == net::ERR_IO_PENDING) {
- // The callback will send the reply.
- return;
- }
}
}
ChromeViewHostMsg_ClearCache::WriteReplyParams(reply_msg, rv);
diff --git a/chrome/browser/chrome_benchmarking_message_filter.h b/chrome/browser/chrome_benchmarking_message_filter.h
index 7f0ecb4..35c60bc 100644
--- a/chrome/browser/chrome_benchmarking_message_filter.h
+++ b/chrome/browser/chrome_benchmarking_message_filter.h
@@ -33,7 +33,7 @@ class ChromeBenchmarkingMessageFilter : public content::BrowserMessageFilter {
// Message handlers.
void OnCloseCurrentConnections();
- void OnClearCache(bool preserve_ssl_host_info, IPC::Message* reply_msg);
+ void OnClearCache(IPC::Message* reply_msg);
void OnClearHostResolverCache(int* result);
void OnEnableSpdy(bool enable);
void OnSetCacheMode(bool enabled);
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 29c8861..e57f5d9 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -612,7 +612,6 @@ void IOThread::InitSystemRequestContextOnIOThread() {
globals_->system_server_bound_cert_service.get();
system_params.transport_security_state =
globals_->transport_security_state.get();
- system_params.ssl_host_info_factory = NULL;
system_params.proxy_service = globals_->system_proxy_service.get();
system_params.ssl_config_service = globals_->ssl_config_service.get();
system_params.http_auth_handler_factory =