| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |