Index: chrome/browser/profiles/profile_window.cc |
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc |
index 84a36f52c008f5ad465de386ba1f7a85616b5c19..ca62eeafa2250d40c43e45cfb7e066c2241fa2f8 100644 |
--- a/chrome/browser/profiles/profile_window.cc |
+++ b/chrome/browser/profiles/profile_window.cc |
@@ -11,6 +11,7 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/about_flags.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/pref_service_flags_storage.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_avatar_icon_util.h" |
@@ -36,6 +37,9 @@ using content::BrowserThread; |
namespace { |
+const char kNewProfileManagementExperimentInternalName[] = |
+ "enable-new-profile-management"; |
+ |
// Handles running a callback when a new Browser for the given profile |
// has been completely created. |
class BrowserAddedForProfileObserver : public chrome::BrowserListObserver { |
@@ -302,8 +306,6 @@ void ShowUserManagerMaybeWithTutorial(Profile* profile) { |
} |
void EnableNewProfileManagementPreview() { |
- const char kNewProfileManagementExperimentInternalName[] = |
- "enable-new-profile-management"; |
about_flags::PrefServiceFlagsStorage flags_storage( |
g_browser_process->local_state()); |
about_flags::SetExperimentEnabled( |
@@ -316,4 +318,14 @@ void EnableNewProfileManagementPreview() { |
chrome::ShowUserManagerWithTutorial(profiles::USER_MANAGER_TUTORIAL_OVERVIEW); |
} |
+void DisableNewProfileManagementPreview() { |
+ about_flags::PrefServiceFlagsStorage flags_storage( |
+ g_browser_process->local_state()); |
+ about_flags::SetExperimentEnabled( |
+ &flags_storage, |
+ kNewProfileManagementExperimentInternalName, |
+ false); |
+ chrome::AttemptRestart(); |
+} |
+ |
} // namespace profiles |