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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix weird formatting in recent_tabs_sub_menu_model.cc Created 4 years, 3 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
OLDNEW
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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER); 1102 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER);
1103 ProfileMetrics::LogProfileNewAvatarMenuNotYou( 1103 ProfileMetrics::LogProfileNewAvatarMenuNotYou(
1104 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK); 1104 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK);
1105 } else { 1105 } else {
1106 // Either one of the "other profiles", or one of the profile accounts 1106 // Either one of the "other profiles", or one of the profile accounts
1107 // buttons was pressed. 1107 // buttons was pressed.
1108 ButtonIndexes::const_iterator profile_match = 1108 ButtonIndexes::const_iterator profile_match =
1109 open_other_profile_indexes_map_.find(sender); 1109 open_other_profile_indexes_map_.find(sender);
1110 if (profile_match != open_other_profile_indexes_map_.end()) { 1110 if (profile_match != open_other_profile_indexes_map_.end()) {
1111 avatar_menu_->SwitchToProfile( 1111 avatar_menu_->SwitchToProfile(
1112 profile_match->second, 1112 profile_match->second, ui::DispositionFromEventFlags(event.flags()) ==
1113 ui::DispositionFromEventFlags(event.flags()) == NEW_WINDOW, 1113 WindowOpenDisposition::NEW_WINDOW,
1114 ProfileMetrics::SWITCH_PROFILE_ICON); 1114 ProfileMetrics::SWITCH_PROFILE_ICON);
1115 } else { 1115 } else {
1116 // This was a profile accounts button. 1116 // This was a profile accounts button.
1117 AccountButtonIndexes::const_iterator account_match = 1117 AccountButtonIndexes::const_iterator account_match =
1118 delete_account_button_map_.find(sender); 1118 delete_account_button_map_.find(sender);
1119 if (account_match != delete_account_button_map_.end()) { 1119 if (account_match != delete_account_button_map_.end()) {
1120 account_id_to_remove_ = account_match->second; 1120 account_id_to_remove_ = account_match->second;
1121 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL); 1121 ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_ACCOUNT_REMOVAL);
1122 } else { 1122 } else {
1123 account_match = reauth_account_button_map_.find(sender); 1123 account_match = reauth_account_button_map_.find(sender);
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2311 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2312 IncognitoModePrefs::DISABLED; 2312 IncognitoModePrefs::DISABLED;
2313 return incognito_available && !browser_->profile()->IsGuestSession(); 2313 return incognito_available && !browser_->profile()->IsGuestSession();
2314 } 2314 }
2315 2315
2316 void ProfileChooserView::PostActionPerformed( 2316 void ProfileChooserView::PostActionPerformed(
2317 ProfileMetrics::ProfileDesktopMenu action_performed) { 2317 ProfileMetrics::ProfileDesktopMenu action_performed) {
2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 2318 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 2319 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
2320 } 2320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698