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

Unified Diff: chrome/test/base/testing_profile.h

Issue 10823208: Reverting this as it causes browser tests on the Linux ChromiumOS builder to fail. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/test/base/testing_browser_process.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.h
===================================================================
--- chrome/test/base/testing_profile.h (revision 150390)
+++ chrome/test/base/testing_profile.h (working copy)
@@ -58,54 +58,6 @@
// Default constructor that cannot be used with multi-profiles.
TestingProfile();
- // Helper class for building an instance of TestingProfile (allows injecting
- // mocks for various services prior to profile initialization).
- // TODO(atwilson): Remove non-default constructors and various setters in
- // favor of using the Builder API.
- class Builder {
- public:
- Builder();
- ~Builder();
-
- // Sets a Delegate to be called back when the Profile is fully initialized.
- // This causes the final initialization to be performed via a task so the
- // caller must run a MessageLoop. Caller maintains ownership of the Delegate
- // and must manage its lifetime so it continues to exist until profile
- // initialization is complete.
- void SetDelegate(Delegate* delegate);
-
- // Sets the ExtensionSpecialStoragePolicy to be returned by
- // GetExtensionSpecialStoragePolicy().
- void SetExtensionSpecialStoragePolicy(
- scoped_refptr<ExtensionSpecialStoragePolicy> policy);
-
- // Sets the path to the directory to be used to hold profile data.
- void SetPath(const FilePath& path);
-
- // Sets the PrefService to be used by this profile.
- void SetPrefService(scoped_ptr<PrefService> prefs);
-
- // Sets the UserCloudPolicyManager to be used by this profile.
- void SetUserCloudPolicyManager(
- scoped_ptr<policy::UserCloudPolicyManager> manager);
-
- // Creates the TestingProfile using previously-set settings.
- scoped_ptr<TestingProfile> Build();
-
- private:
- // If true, Build() has already been called.
- bool build_called_;
-
- // Various staging variables where values are held until Build() is invoked.
- scoped_ptr<policy::UserCloudPolicyManager> user_cloud_policy_manager_;
- scoped_ptr<PrefService> pref_service_;
- scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy_;
- FilePath path_;
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(Builder);
- };
-
// Multi-profile aware constructor that takes the path to a directory managed
// for this profile. This constructor is meant to be used by
// TestingProfileManager::CreateTestingProfile. If you need to create multi-
@@ -119,14 +71,6 @@
// for unittesting the ProfileManager.
TestingProfile(const FilePath& path, Delegate* delegate);
- // Full constructor allowing the setting of all possible instance data.
- // Callers should use Builder::Build() instead of invoking this constructor.
- TestingProfile(const FilePath& path,
- Delegate* delegate,
- scoped_refptr<ExtensionSpecialStoragePolicy> extension_policy,
- scoped_ptr<PrefService> prefs,
- scoped_ptr<policy::UserCloudPolicyManager> manager);
-
virtual ~TestingProfile();
// Creates the favicon service. Consequent calls would recreate the service.
@@ -223,8 +167,6 @@
// this by calling CreateRequestContext(). See the note at GetRequestContext
// for more information.
net::CookieMonster* GetCookieMonster();
-
- virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE;
virtual policy::PolicyService* GetPolicyService() OVERRIDE;
// Sets the profile's PrefService. If a pref service hasn't been explicitly
// set GetPrefs creates one, so normally you need not invoke this. If you need
@@ -300,9 +242,6 @@
TestingPrefService* testing_prefs_;
private:
- // Creates a temporary directory for use by this profile.
- void CreateTempProfileDir();
-
// Common initialization between the two constructors.
void Init();
@@ -350,9 +289,6 @@
// The proxy prefs tracker.
scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
- // UserCloudPolicyManager returned by GetUserCloudPolicyManager().
- scoped_ptr<policy::UserCloudPolicyManager> user_cloud_policy_manager_;
-
// 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.
« no previous file with comments | « chrome/test/base/testing_browser_process.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698