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); |
}; |