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

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

Issue 11238034: Added completion notification to Profile's ClearNetworkingHistorySince. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superflous empty line. Created 8 years, 2 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
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 faba3535fa634f92fc430102620364147e664686..89fce3ffca73ea83bf8e3e8f8cc37d537fe215cf 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -258,7 +258,8 @@ ProfileImplIOData::Handle::GetIsolatedMediaRequestContextGetter(
}
void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
- base::Time time) {
+ base::Time time,
+ const base::Closure& completion) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
@@ -267,7 +268,8 @@ void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
base::Bind(
&ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread,
base::Unretained(io_data_),
- time));
+ time,
+ completion));
}
void ProfileImplIOData::Handle::LazyInitialize() const {
@@ -663,12 +665,13 @@ void ProfileImplIOData::SetUpJobFactory(
}
void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread(
- base::Time time) {
+ base::Time time,
+ const base::Closure& completion) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
LazyInitialize();
DCHECK(transport_security_state());
- transport_security_state()->DeleteSince(time);
+ transport_security_state()->DeleteSince(time); // Completes synchronously.
DCHECK(http_server_properties_manager());
- http_server_properties_manager()->Clear();
+ http_server_properties_manager()->Clear(completion);
}

Powered by Google App Engine
This is Rietveld 408576698