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

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

Issue 12040085: Adding show profile switcher field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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_manager.h
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h
index 9d1e03f7be98e6f2588722ed9ca352026de91515..8a45c22ace68f7266d67b370803f4e2dd9d6870a 100644
--- a/chrome/browser/profiles/profile_manager.h
+++ b/chrome/browser/profiles/profile_manager.h
@@ -202,6 +202,13 @@ class ProfileManager : public base::NonThreadSafe,
// Checks if multiple profiles is enabled.
static bool IsMultipleProfilesEnabled();
+ // Force IsMultipleProfilesEnabled to return a given value. For testing
+ // purposes.
+ static void ForceMultipleProfilesForTests(bool forcedValue);
+
+ // Lets IsMultipleProfilesEnabled behave in a normal, unforced way.
+ static void UnforceMultipleProfilesForTests();
+
// Autoloads profiles if they are running background apps.
void AutoloadProfiles();
@@ -349,6 +356,14 @@ class ProfileManager : public base::NonThreadSafe,
std::vector<Profile*> active_profiles_;
bool closing_all_browsers_;
+ // For forcing IsMultiProfilesEnabled to the value of
+ // multiple_profiles_forced_value_. Used for testing.
+ static bool is_multiple_profiles_forced_;
sail 2013/01/31 17:15:23 maybe use an enum instead of 2 bools, something li
jwd 2013/01/31 19:26:11 Done. Kept the api the same though.
+
+ // The value returned by IsMultiProfilesEnabled when it's been forced. Used
+ // for testing.
+ static bool multiple_profiles_forced_value_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileManager);
};

Powered by Google App Engine
This is Rietveld 408576698