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

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: Fixed IO/UI typo and rebased. Created 8 years, 1 month 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/test/base/testing_profile.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 e5c2456471953dd7aae70c9a38436291beb9472c..2a539271da80b2aaa6c6cd669838b6505a1eb27e 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -269,7 +269,8 @@ ProfileImplIOData::Handle::GetIsolatedMediaRequestContextGetter(
}
void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
- base::Time time) {
+ base::Time time,
+ const base::Closure& completion) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
@@ -278,7 +279,8 @@ void ProfileImplIOData::Handle::ClearNetworkingHistorySince(
base::Bind(
&ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread,
base::Unretained(io_data_),
- time));
+ time,
+ completion));
}
void ProfileImplIOData::Handle::LazyInitialize() const {
@@ -677,12 +679,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);
}
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698