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

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

Issue 2709763002: Removing Fast User Switcher feature. (Closed)
Patch Set: Removing PopulateCompleteProfileChooserView and PopulateMinimalProfileChooserView Created 3 years, 9 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/app/chrome_command_ids.h ('k') | chrome/browser/ui/browser_command_controller.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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 *bubble_view_mode = BUBBLE_VIEW_MODE_GAIA_REAUTH; 500 *bubble_view_mode = BUBBLE_VIEW_MODE_GAIA_REAUTH;
501 return; 501 return;
502 case BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN: 502 case BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN:
503 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 503 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
504 *tutorial_mode = TUTORIAL_MODE_CONFIRM_SIGNIN; 504 *tutorial_mode = TUTORIAL_MODE_CONFIRM_SIGNIN;
505 return; 505 return;
506 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: 506 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR:
507 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 507 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
508 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; 508 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR;
509 return; 509 return;
510 case BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH:
511 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER;
512 return;
513 default: 510 default:
514 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 511 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
515 } 512 }
516 } 513 }
517 514
518 bool ShouldShowWelcomeUpgradeTutorial( 515 bool ShouldShowWelcomeUpgradeTutorial(
519 Profile* profile, TutorialMode tutorial_mode) { 516 Profile* profile, TutorialMode tutorial_mode) {
520 const int show_count = profile->GetPrefs()->GetInteger( 517 const int show_count = profile->GetPrefs()->GetInteger(
521 prefs::kProfileAvatarTutorialShown); 518 prefs::kProfileAvatarTutorialShown);
522 // Do not show the tutorial if user has dismissed it. 519 // Do not show the tutorial if user has dismissed it.
523 if (show_count > signin_ui_util::kUpgradeWelcomeTutorialShowMax) 520 if (show_count > signin_ui_util::kUpgradeWelcomeTutorialShowMax)
524 return false; 521 return false;
525 522
526 return tutorial_mode == TUTORIAL_MODE_WELCOME_UPGRADE || 523 return tutorial_mode == TUTORIAL_MODE_WELCOME_UPGRADE ||
527 show_count != signin_ui_util::kUpgradeWelcomeTutorialShowMax; 524 show_count != signin_ui_util::kUpgradeWelcomeTutorialShowMax;
528 } 525 }
529 526
530 bool ShouldShowRightClickTutorial(Profile* profile) { 527 bool ShouldShowRightClickTutorial(Profile* profile) {
531 PrefService* local_state = g_browser_process->local_state(); 528 PrefService* local_state = g_browser_process->local_state();
532 const bool dismissed = local_state->GetBoolean( 529 const bool dismissed = local_state->GetBoolean(
533 prefs::kProfileAvatarRightClickTutorialDismissed); 530 prefs::kProfileAvatarRightClickTutorialDismissed);
534 531
535 // Don't show the tutorial if it's already been dismissed or if right-clicking 532 // Don't show the tutorial if it's already been dismissed or if right-clicking
536 // wouldn't show any targets. 533 // wouldn't show any targets.
537 return !dismissed && HasProfileSwitchTargets(profile); 534 return !dismissed && HasProfileSwitchTargets(profile);
538 } 535 }
539 536
540 } // namespace profiles 537 } // namespace profiles
OLDNEW
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698