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

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

Issue 11238034: Added completion notification to Profile's ClearNetworkingHistorySince. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits, the important question remains. 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.h
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h
index 55740c584ec2b64583cae80c5778056da2909e35..ecbac12288b4f2564d1e6f39134df7522ec5af7a 100644
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -71,13 +71,21 @@ class ProfileImplIOData : public ProfileIOData {
GetIsolatedMediaRequestContextGetter(
const std::string& app_id) const;
- void ClearNetworkingHistorySince(base::Time time);
+ void ClearNetworkingHistorySince(base::Time time,
+ const base::Closure& completion);
private:
+ friend class TestingProfile;
+
typedef base::hash_map<std::string,
scoped_refptr<ChromeURLRequestContextGetter> >
ChromeURLRequestContextGetterMap;
+ // Sets up a skeleton instance to be used by TestingProfile in unit tests.
+ // Gets the object into a virtually initialized state, but skips most of the
+ // usual initialization steps, and only creates what is needed for testing.
+ void InitForTesting() const;
+
// Lazily initialize ProfileParams. We do this on the calls to
// Get*RequestContextGetter(), so we only initialize ProfileParams right
// before posting a task to the IO thread to start using them. This prevents
@@ -168,7 +176,8 @@ class ProfileImplIOData : public ProfileIOData {
net::FtpAuthCache* ftp_auth_cache) const;
// Clears the networking history since |time|.
- void ClearNetworkingHistorySinceOnIOThread(base::Time time);
+ void ClearNetworkingHistorySinceOnIOThread(base::Time time,
+ const base::Closure& completion);
// Lazy initialization params.
mutable scoped_ptr<LazyParams> lazy_params_;

Powered by Google App Engine
This is Rietveld 408576698