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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 7966005: Move TransportSecurityPersister completely to IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index c575ccd824f7064df48ab458942009d29c280fce..8314f0d5d442c368e5ae1e60cfb79a5268b3cd67 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -29,6 +29,16 @@
#include "net/http/http_cache.h"
#include "net/url_request/url_request_job_factory.h"
+namespace {
+
+void DeleteTransportSecurityStateSinceOnIOThread(
+ ProfileImplIOData* io_data, base::Time time) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ io_data->transport_security_state()->DeleteSince(time);
+}
+
+} // namespace
+
ProfileImplIOData::Handle::Handle(Profile* profile)
: io_data_(new ProfileImplIOData),
profile_(profile),
@@ -176,6 +186,19 @@ ProfileImplIOData::Handle::GetIsolatedAppRequestContextGetter(
return context;
}
+void ProfileImplIOData::Handle::DeleteTransportSecurityStateSince(
+ base::Time time) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ LazyInitialize();
+
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(
+ &DeleteTransportSecurityStateSinceOnIOThread,
+ io_data_,
+ time));
+}
+
void ProfileImplIOData::Handle::LazyInitialize() const {
if (!initialized_) {
io_data_->InitializeOnUIThread(profile_);
@@ -225,6 +248,11 @@ void ProfileImplIOData::LazyInitializeInternal(
ApplyProfileParamsToContext(media_request_context_);
ApplyProfileParamsToContext(extensions_context);
+ main_context->set_transport_security_state(transport_security_state());
+ media_request_context_->set_transport_security_state(
+ transport_security_state());
+ extensions_context->set_transport_security_state(transport_security_state());
+
main_context->set_net_log(io_thread->net_log());
media_request_context_->set_net_log(io_thread->net_log());
extensions_context->set_net_log(io_thread->net_log());
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698