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

Unified Diff: chrome/test/base/testing_profile.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/test/base/testing_profile.h
diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h
index 81e4111e8312cf0c2404e82536e7cab00fd48d23..5cda35a1a5ec7bb28268ed589125894f8c4f1138 100644
--- a/chrome/test/base/testing_profile.h
+++ b/chrome/test/base/testing_profile.h
@@ -13,6 +13,7 @@
#include "base/timer.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_impl_io_data.h"
namespace content {
class MockResourceContext;
@@ -176,6 +177,9 @@ class TestingProfile : public Profile {
TestingPrefService* GetTestingPrefService();
+ // Initializes a skeleton ProfileIOData instance required for some unit tests.
+ void CreateSkeletonIODataForTesting();
+
// content::BrowserContext
virtual FilePath GetPath() OVERRIDE;
virtual bool IsOffTheRecord() const OVERRIDE;
@@ -294,7 +298,9 @@ class TestingProfile : public Profile {
void BlockUntilHistoryProcessesPendingRequests();
virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
- virtual void ClearNetworkingHistorySince(base::Time time) OVERRIDE;
+ virtual void ClearNetworkingHistorySince(
+ base::Time time,
+ const base::Closure& completion) OVERRIDE;
virtual GURL GetHomePage() OVERRIDE;
virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
@@ -353,6 +359,11 @@ class TestingProfile : public Profile {
// UserCloudPolicyManager returned by GetUserCloudPolicyManager().
scoped_ptr<policy::UserCloudPolicyManager> user_cloud_policy_manager_;
+ // A skeleton ProfileIOData instance, with very limited functionality, needed
+ // for some unit tests.
+ // Initialized on-demand by calling CreateSkeletonIODataForTesting().
+ scoped_ptr<ProfileImplIOData::Handle> io_data_;
+
// We use a temporary directory to store testing profile data. In a multi-
// profile environment, this is invalid and the directory is managed by the
// TestingProfileManager.

Powered by Google App Engine
This is Rietveld 408576698