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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER); | 1094 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER); |
1095 ProfileMetrics::LogProfileNewAvatarMenuNotYou( | 1095 ProfileMetrics::LogProfileNewAvatarMenuNotYou( |
1096 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK); | 1096 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK); |
1097 } else { | 1097 } else { |
1098 // Either one of the "other profiles", or one of the profile accounts | 1098 // Either one of the "other profiles", or one of the profile accounts |
1099 // buttons was pressed. | 1099 // buttons was pressed. |
1100 ButtonIndexes::const_iterator profile_match = | 1100 ButtonIndexes::const_iterator profile_match = |
1101 open_other_profile_indexes_map_.find(sender); | 1101 open_other_profile_indexes_map_.find(sender); |
1102 if (profile_match != open_other_profile_indexes_map_.end()) { | 1102 if (profile_match != open_other_profile_indexes_map_.end()) { |
1103 avatar_menu_->SwitchToProfile( | 1103 avatar_menu_->SwitchToProfile( |
1104 profile_match->second, | 1104 profile_match->second, ui::DispositionFromEventFlags(event.flags()) == |
1105 ui::DispositionFromEventFlags(event.flags()) == NEW_WINDOW, | 1105 WindowOpenDisposition::NEW_WINDOW, |
1106 ProfileMetrics::SWITCH_PROFILE_ICON); | 1106 ProfileMetrics::SWITCH_PROFILE_ICON); |
1107 } else { | 1107 } else { |
1108 // This was a profile accounts button. | 1108 // This was a profile accounts button. |
1109 AccountButtonIndexes::const_iterator account_match = | 1109 AccountButtonIndexes::const_iterator account_match = |
1110 delete_account_button_map_.find(sender); | 1110 delete_account_button_map_.find(sender); |
1111 if (account_match != delete_account_button_map_.end()) { | 1111 if (account_match != delete_account_button_map_.end()) { |
1112 account_id_to_remove_ = account_match->second; | 1112 account_id_to_remove_ = account_match->second; |
1113 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL); | 1113 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL); |
1114 } else { | 1114 } else { |
1115 account_match = reauth_account_button_map_.find(sender); | 1115 account_match = reauth_account_button_map_.find(sender); |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2303 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
2304 IncognitoModePrefs::DISABLED; | 2304 IncognitoModePrefs::DISABLED; |
2305 return incognito_available && !browser_->profile()->IsGuestSession(); | 2305 return incognito_available && !browser_->profile()->IsGuestSession(); |
2306 } | 2306 } |
2307 | 2307 |
2308 void ProfileChooserView::PostActionPerformed( | 2308 void ProfileChooserView::PostActionPerformed( |
2309 ProfileMetrics::ProfileDesktopMenu action_performed) { | 2309 ProfileMetrics::ProfileDesktopMenu action_performed) { |
2310 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 2310 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
2311 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 2311 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
2312 } | 2312 } |
OLD | NEW |