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

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

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.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 178b74f9d1b387434fff2e2fc50b25fec4f9cc63..311ae64953e69d92efb00526309632d526005add 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1025,7 +1025,21 @@ void ProfileManager::ScheduleProfileForDeletion(
}
// static
+void ProfileManager::ForceMultipleProfilesForTests(bool forcedValue) {
+ is_multiple_profiles_forced_ = true;
+ multiple_profiles_forced_value_ = forcedValue;
+}
+
+// static
+void ProfileManager::UnforceMultipleProfilesForTests() {
+ is_multiple_profiles_forced_ = false;
+}
+
+// static
bool ProfileManager::IsMultipleProfilesEnabled() {
+ if (is_multiple_profiles_forced_)
sail 2013/01/31 17:15:23 I think this should move to the very bottom
jwd 2013/01/31 19:26:11 See new comment and response.
+ return multiple_profiles_forced_value_;
+
#if defined(OS_ANDROID)
return false;
#endif
@@ -1094,3 +1108,9 @@ ProfileManager::ProfileInfo::ProfileInfo(
ProfileManager::ProfileInfo::~ProfileInfo() {
ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release());
}
+
+// static
+bool ProfileManager::is_multiple_profiles_forced_ = false;
+
+// static
+bool ProfileManager::multiple_profiles_forced_value_ = true;

Powered by Google App Engine
This is Rietveld 408576698