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

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

Issue 255203002: Implement end-preview flow with views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo fixed Created 6 years, 8 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/browser/profiles/profile_window.h ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/profiles/profile_window.h ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698