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

Unified Diff: chrome/browser/signin/signin_ui_util.cc

Issue 467853002: Suppress the upgrade tutorial for new profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roger's comments addressed Created 6 years, 4 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/signin/signin_ui_util.cc
diff --git a/chrome/browser/signin/signin_ui_util.cc b/chrome/browser/signin/signin_ui_util.cc
index 39dd3fbd22f672ba41adc321476c901114ca4f61..a3987f8d78f7638a57d218aa7c83faed19f40080 100644
--- a/chrome/browser/signin/signin_ui_util.cc
+++ b/chrome/browser/signin/signin_ui_util.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/signin/signin_ui_util.h"
+#include "base/prefs/pref_service.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -15,8 +16,10 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/sync_global_error.h"
#include "chrome/browser/sync/sync_global_error_factory.h"
+#include "chrome/common/pref_names.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_manager.h"
+#include "components/signin/core/common/profile_management_switches.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -153,4 +156,12 @@ void GetStatusLabelsForAuthError(Profile* profile,
}
}
+void InitializePrefsForProfile(Profile* profile) {
+ // Suppresses the upgrade tutorial for a new profile.
+ if (profile->IsNewProfile() && switches::IsNewAvatarMenu()) {
+ profile->GetPrefs()->SetInteger(
+ prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1);
+ }
+}
+
} // namespace signin_ui_util
« no previous file with comments | « chrome/browser/signin/signin_ui_util.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698