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

Unified Diff: chrome/browser/ui/views/profile_chooser_view.cc

Issue 199533004: [Mac, Win] Show a user manager tutorial once per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: much refactor. such change. Created 6 years, 9 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/ui/views/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profile_chooser_view.cc b/chrome/browser/ui/views/profile_chooser_view.cc
index 20c3b73c6e7ab32ffbe7d03f85cf1de60bb43848..beb56e284188719322d07d34e4b0a2c724989170 100644
--- a/chrome/browser/ui/views/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profile_chooser_view.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/views/user_manager_view.h"
#include "chrome/common/pref_names.h"
@@ -523,7 +522,18 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
size_t active_index = avatar_menu_->GetActiveProfileIndex();
profile_path = avatar_menu_->GetItemAt(active_index).profile_path;
}
- chrome::ShowUserManager(profile_path);
+
+ // Show the tutorial if it hasn't been shown before. This is the same
+ // logic as in profile_chooser_controller.mm.
+ PrefService* pref_service = browser_->profile()->GetPrefs();
+ bool tutorial_shown = pref_service->GetBoolean(
+ prefs::kProfileUserManagerTutorialShown);
+ if (!tutorial_shown)
+ pref_service->SetBoolean(prefs::kProfileUserManagerTutorialShown, true);
+ UserManagerView::Show(
+ profile_path,
+ tutorial_shown ? profiles::USER_MANAGER_NO_TUTORIAL :
+ profiles::USER_MANAGER_TUTORIAL_OVERVIEW);
Alexei Svitkine (slow) 2014/03/18 15:50:33 I think it would be better to keep the entry point
noms (inactive) 2014/03/18 17:39:09 The problem with that is that ShowUserManager() ca
Alexei Svitkine (slow) 2014/03/18 17:45:40 I see - okay, sgtm.
noms (inactive) 2014/03/19 15:58:20 Done.
} else if (sender == add_user_button_) {
profiles::CreateAndSwitchToNewProfile(
browser_->host_desktop_type(),

Powered by Google App Engine
This is Rietveld 408576698