| 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/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/metrics/user_metrics.h" | 8 #include "base/metrics/user_metrics.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 profiles::CloseProfileWindows(browser_->profile()); | 1020 profiles::CloseProfileWindows(browser_->profile()); |
| 1021 } else if (sender == auth_error_email_button_ || | 1021 } else if (sender == auth_error_email_button_ || |
| 1022 sender == sync_error_signin_button_) { | 1022 sender == sync_error_signin_button_) { |
| 1023 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH); | 1023 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH); |
| 1024 } else if (sender == sync_error_passphrase_button_) { | 1024 } else if (sender == sync_error_passphrase_button_) { |
| 1025 chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage); | 1025 chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage); |
| 1026 } else if (sender == sync_error_upgrade_button_) { | 1026 } else if (sender == sync_error_upgrade_button_) { |
| 1027 chrome::OpenUpdateChromeDialog(browser_); | 1027 chrome::OpenUpdateChromeDialog(browser_); |
| 1028 } else if (sender == sync_error_signin_again_button_) { | 1028 } else if (sender == sync_error_signin_again_button_) { |
| 1029 if (ProfileSyncServiceFactory::GetForProfile(browser_->profile())) | 1029 if (ProfileSyncServiceFactory::GetForProfile(browser_->profile())) |
| 1030 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 1030 browser_sync::ProfileSyncService::SyncEvent( |
| 1031 browser_sync::ProfileSyncService::STOP_FROM_OPTIONS); |
| 1031 SigninManagerFactory::GetForProfile(browser_->profile()) | 1032 SigninManagerFactory::GetForProfile(browser_->profile()) |
| 1032 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, | 1033 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, |
| 1033 signin_metrics::SignoutDelete::IGNORE_METRIC); | 1034 signin_metrics::SignoutDelete::IGNORE_METRIC); |
| 1034 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN); | 1035 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN); |
| 1035 } else if (sender == sync_error_signout_button_) { | 1036 } else if (sender == sync_error_signout_button_) { |
| 1036 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); | 1037 chrome::ShowSettingsSubPage(browser_, chrome::kSignOutSubPage); |
| 1037 } else if (sender == tutorial_sync_settings_ok_button_) { | 1038 } else if (sender == tutorial_sync_settings_ok_button_) { |
| 1038 LoginUIServiceFactory::GetForProfile(browser_->profile())-> | 1039 LoginUIServiceFactory::GetForProfile(browser_->profile())-> |
| 1039 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS); | 1040 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS); |
| 1040 DismissTutorial(); | 1041 DismissTutorial(); |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2304 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2305 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2305 IncognitoModePrefs::DISABLED; | 2306 IncognitoModePrefs::DISABLED; |
| 2306 return incognito_available && !browser_->profile()->IsGuestSession(); | 2307 return incognito_available && !browser_->profile()->IsGuestSession(); |
| 2307 } | 2308 } |
| 2308 | 2309 |
| 2309 void ProfileChooserView::PostActionPerformed( | 2310 void ProfileChooserView::PostActionPerformed( |
| 2310 ProfileMetrics::ProfileDesktopMenu action_performed) { | 2311 ProfileMetrics::ProfileDesktopMenu action_performed) { |
| 2311 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 2312 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
| 2312 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 2313 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
| 2313 } | 2314 } |
| OLD | NEW |