| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 avatar_menu_.get()); | 865 avatar_menu_.get()); |
| 866 } else if (sender == add_account_link_) { | 866 } else if (sender == add_account_link_) { |
| 867 ShowView(profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT, avatar_menu_.get()); | 867 ShowView(profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT, avatar_menu_.get()); |
| 868 PostActionPerformed(ProfileMetrics::PROFILE_DESKTOP_MENU_ADD_ACCT); | 868 PostActionPerformed(ProfileMetrics::PROFILE_DESKTOP_MENU_ADD_ACCT); |
| 869 } else if (sender == tutorial_sync_settings_link_) { | 869 } else if (sender == tutorial_sync_settings_link_) { |
| 870 LoginUIServiceFactory::GetForProfile(browser_->profile())-> | 870 LoginUIServiceFactory::GetForProfile(browser_->profile())-> |
| 871 SyncConfirmationUIClosed(true /* configure_sync_first */); | 871 SyncConfirmationUIClosed(true /* configure_sync_first */); |
| 872 tutorial_mode_ = profiles::TUTORIAL_MODE_NONE; | 872 tutorial_mode_ = profiles::TUTORIAL_MODE_NONE; |
| 873 ProfileMetrics::LogProfileNewAvatarMenuSignin( | 873 ProfileMetrics::LogProfileNewAvatarMenuSignin( |
| 874 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_SETTINGS); | 874 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_SETTINGS); |
| 875 Hide(); | |
| 876 } else if (sender == tutorial_not_you_link_) { | 875 } else if (sender == tutorial_not_you_link_) { |
| 877 ProfileMetrics::LogProfileNewAvatarMenuUpgrade( | 876 ProfileMetrics::LogProfileNewAvatarMenuUpgrade( |
| 878 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU); | 877 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU); |
| 879 ShowView(profiles::BUBBLE_VIEW_MODE_SWITCH_USER, avatar_menu_.get()); | 878 ShowView(profiles::BUBBLE_VIEW_MODE_SWITCH_USER, avatar_menu_.get()); |
| 880 } else { | 879 } else { |
| 881 DCHECK(sender == tutorial_learn_more_link_); | 880 DCHECK(sender == tutorial_learn_more_link_); |
| 882 signin_ui_util::ShowSigninErrorLearnMorePage(browser_->profile()); | 881 signin_ui_util::ShowSigninErrorLearnMorePage(browser_->profile()); |
| 883 } | 882 } |
| 884 } | 883 } |
| 885 | 884 |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1742 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 1744 IncognitoModePrefs::DISABLED; | 1743 IncognitoModePrefs::DISABLED; |
| 1745 return incognito_available && !browser_->profile()->IsGuestSession(); | 1744 return incognito_available && !browser_->profile()->IsGuestSession(); |
| 1746 } | 1745 } |
| 1747 | 1746 |
| 1748 void ProfileChooserView::PostActionPerformed( | 1747 void ProfileChooserView::PostActionPerformed( |
| 1749 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1748 ProfileMetrics::ProfileDesktopMenu action_performed) { |
| 1750 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1749 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
| 1751 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1750 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
| 1752 } | 1751 } |
| OLD | NEW |