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

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

Issue 1120013003: Add right-click user switching tutorial bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make the pref per-chrome instead of per-profile. Created 5 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
Index: chrome/browser/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index f0b3ac3c53942a2b327abd0728d5d18446fb9f27..7fb3f13b347ec1e88cb75efb9ede4347b18b1ee7 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -53,6 +53,9 @@ void RegisterPrefs(PrefRegistrySimple* registry) {
// Preferences about the user manager.
registry->RegisterBooleanPref(prefs::kBrowserGuestModeEnabled, true);
registry->RegisterBooleanPref(prefs::kBrowserAddPersonEnabled, true);
+
+ registry->RegisterBooleanPref(
Mike Lerman 2015/05/05 01:31:45 Let's register this near where the other tutorial
anthonyvd 2015/05/05 16:19:17 I put it here because the tutorial prefs in profil
Mike Lerman 2015/05/05 17:18:09 So we show it once per Chrome, not one per Profile
+ prefs::kProfileAvatarRightClickTutorialDismissed, false);
}
base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path) {
@@ -237,4 +240,16 @@ void RemoveBrowsingDataForProfile(const base::FilePath& profile_path) {
// BrowsingDataRemover deletes itself.
}
+void SetFastUserSwitchingTutorialDismissedState(bool dismissed) {
Mike Lerman 2015/05/05 01:31:45 We usually just directly access this type of prefe
anthonyvd 2015/05/05 16:19:17 I guess it just... happened. There no need really,
+ PrefService* local_state = g_browser_process->local_state();
+ local_state->SetBoolean(
+ prefs::kProfileAvatarRightClickTutorialDismissed, dismissed);
+}
+
+bool GetFastUserSwitchingTutorialDismissedState() {
+ PrefService* local_state = g_browser_process->local_state();
+ return local_state->GetBoolean(
+ prefs::kProfileAvatarRightClickTutorialDismissed);
+}
+
} // namespace profiles

Powered by Google App Engine
This is Rietveld 408576698