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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

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
« no previous file with comments | « chrome/browser/signin/signin_ui_util.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index a060e297211c1d1e00ae8ecc09048f89d0981a96..6637a59d9430307b4cd04e043947db06465cdb16 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -12,7 +12,6 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/avatar_menu.h"
@@ -27,6 +26,7 @@
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
+#include "chrome/browser/signin/signin_ui_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
@@ -95,10 +95,6 @@ const CGFloat kFixedAccountRemovalViewWidth = 280;
// Fixed size for the switch user view.
const int kFixedSwitchUserViewWidth = 280;
-// Maximum number of times to show the welcome tutorial in the profile avatar
-// bubble.
-const int kUpgradeWelcomeTutorialShowMax = 1;
-
// The tag number for the primary account.
const int kPrimaryProfileTag = -1;
@@ -1165,26 +1161,24 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
}
- (NSView*)buildWelcomeUpgradeTutorialViewIfNeeded {
- if (first_run::IsChromeFirstRun())
- return nil;
-
Profile* profile = browser_->profile();
const AvatarMenu::Item& avatarItem =
avatarMenu_->GetItemAt(avatarMenu_->GetActiveProfileIndex());
if (!avatarItem.signed_in) {
profile->GetPrefs()->SetInteger(
- prefs::kProfileAvatarTutorialShown, kUpgradeWelcomeTutorialShowMax + 1);
+ prefs::kProfileAvatarTutorialShown,
+ signin_ui_util::kUpgradeWelcomeTutorialShowMax + 1);
return nil;
}
const int showCount = profile->GetPrefs()->GetInteger(
prefs::kProfileAvatarTutorialShown);
// Do not show the tutorial if user has dismissed it.
- if (showCount > kUpgradeWelcomeTutorialShowMax)
+ if (showCount > signin_ui_util::kUpgradeWelcomeTutorialShowMax)
return nil;
if (tutorialMode_ != profiles::TUTORIAL_MODE_WELCOME_UPGRADE) {
- if (showCount == kUpgradeWelcomeTutorialShowMax)
+ if (showCount == signin_ui_util::kUpgradeWelcomeTutorialShowMax)
return nil;
profile->GetPrefs()->SetInteger(
prefs::kProfileAvatarTutorialShown, showCount + 1);
« no previous file with comments | « chrome/browser/signin/signin_ui_util.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698