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

Side by Side Diff: chrome/browser/profiles/profile_window.cc

Issue 2765413002: Removing fast user switcher tutorial (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/profiles/profile_window.h ('k') | chrome/browser/profiles/profiles_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 const int show_count = profile->GetPrefs()->GetInteger( 517 const int show_count = profile->GetPrefs()->GetInteger(
518 prefs::kProfileAvatarTutorialShown); 518 prefs::kProfileAvatarTutorialShown);
519 // Do not show the tutorial if user has dismissed it. 519 // Do not show the tutorial if user has dismissed it.
520 if (show_count > signin_ui_util::kUpgradeWelcomeTutorialShowMax) 520 if (show_count > signin_ui_util::kUpgradeWelcomeTutorialShowMax)
521 return false; 521 return false;
522 522
523 return tutorial_mode == TUTORIAL_MODE_WELCOME_UPGRADE || 523 return tutorial_mode == TUTORIAL_MODE_WELCOME_UPGRADE ||
524 show_count != signin_ui_util::kUpgradeWelcomeTutorialShowMax; 524 show_count != signin_ui_util::kUpgradeWelcomeTutorialShowMax;
525 } 525 }
526 526
527 bool ShouldShowRightClickTutorial(Profile* profile) {
528 PrefService* local_state = g_browser_process->local_state();
529 const bool dismissed = local_state->GetBoolean(
530 prefs::kProfileAvatarRightClickTutorialDismissed);
531
532 // Don't show the tutorial if it's already been dismissed or if right-clicking
533 // wouldn't show any targets.
534 return !dismissed && HasProfileSwitchTargets(profile);
535 }
536
537 } // namespace profiles 527 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_window.h ('k') | chrome/browser/profiles/profiles_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698