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

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

Issue 777143003: Clean up straggler classes to use embedded signin in page in the new profiles world. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years 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/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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 delete_account_button_map_[delete_button] = account_id; 1423 delete_account_button_map_[delete_button] = account_id;
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 views::View* ProfileChooserView::CreateGaiaSigninView() { 1427 views::View* ProfileChooserView::CreateGaiaSigninView() {
1428 GURL url; 1428 GURL url;
1429 int message_id; 1429 int message_id;
1430 1430
1431 switch (view_mode_) { 1431 switch (view_mode_) {
1432 case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN: 1432 case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN:
1433 url = signin::GetPromoURL(signin::SOURCE_AVATAR_BUBBLE_SIGN_IN, 1433 url = signin::GetPromoURL(signin_metrics::SOURCE_AVATAR_BUBBLE_SIGN_IN,
1434 false /* auto_close */, 1434 false /* auto_close */,
1435 true /* is_constrained */); 1435 true /* is_constrained */);
1436 message_id = IDS_PROFILES_GAIA_SIGNIN_TITLE; 1436 message_id = IDS_PROFILES_GAIA_SIGNIN_TITLE;
1437 break; 1437 break;
1438 case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT: 1438 case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT:
1439 url = signin::GetPromoURL(signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, 1439 url = signin::GetPromoURL(
1440 false /* auto_close */, 1440 signin_metrics::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT,
1441 true /* is_constrained */); 1441 false /* auto_close */,
1442 true /* is_constrained */);
1442 message_id = IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE; 1443 message_id = IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE;
1443 break; 1444 break;
1444 case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: { 1445 case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: {
1445 DCHECK(HasAuthError(browser_->profile())); 1446 DCHECK(HasAuthError(browser_->profile()));
1446 url = signin::GetReauthURL(browser_->profile(), 1447 url = signin::GetReauthURL(browser_->profile(),
1447 GetAuthErrorUsername(browser_->profile())); 1448 GetAuthErrorUsername(browser_->profile()));
1448 message_id = IDS_PROFILES_GAIA_REAUTH_TITLE; 1449 message_id = IDS_PROFILES_GAIA_REAUTH_TITLE;
1449 break; 1450 break;
1450 } 1451 }
1451 default: 1452 default:
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1668 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1668 IncognitoModePrefs::DISABLED; 1669 IncognitoModePrefs::DISABLED;
1669 return incognito_available && !browser_->profile()->IsGuestSession(); 1670 return incognito_available && !browser_->profile()->IsGuestSession();
1670 } 1671 }
1671 1672
1672 void ProfileChooserView::PostActionPerformed( 1673 void ProfileChooserView::PostActionPerformed(
1673 ProfileMetrics::ProfileDesktopMenu action_performed) { 1674 ProfileMetrics::ProfileDesktopMenu action_performed) {
1674 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1675 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1675 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1676 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1676 } 1677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698