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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 1094103005: Profile chooser on mac was passing wrong value to signin error controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index a2ea2902a2a67d3bd583eb76ec3b8349bcb19f0c..f55258026ec657bf0ba3466211ae3fa8ea3bc099 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
@@ -115,28 +116,19 @@ gfx::ImageSkia CreateSquarePlaceholderImage(int size) {
bool HasAuthError(Profile* profile) {
const SigninErrorController* error =
- profiles::GetSigninErrorController(profile);
+ SigninErrorControllerFactory::GetForProfile(profile);
return error && error->HasError();
}
std::string GetAuthErrorAccountId(Profile* profile) {
const SigninErrorController* error =
- profiles::GetSigninErrorController(profile);
+ SigninErrorControllerFactory::GetForProfile(profile);
if (!error)
return std::string();
return error->error_account_id();
}
-std::string GetAuthErrorUsername(Profile* profile) {
- const SigninErrorController* error =
- profiles::GetSigninErrorController(profile);
- if (!error)
- return std::string();
-
- return error->error_username();
-}
-
// BackgroundColorHoverButton -------------------------------------------------
// A custom button that allows for setting a background color when hovered over.
@@ -1489,7 +1481,7 @@ views::View* ProfileChooserView::CreateGaiaSigninView() {
case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: {
DCHECK(HasAuthError(browser_->profile()));
url = signin::GetReauthURL(browser_->profile(),
- GetAuthErrorUsername(browser_->profile()));
+ GetAuthErrorAccountId(browser_->profile()));
message_id = IDS_PROFILES_GAIA_REAUTH_TITLE;
break;
}

Powered by Google App Engine
This is Rietveld 408576698