| Index: chrome/browser/ui/auto_login_info_bar_delegate.cc
|
| diff --git a/chrome/browser/ui/auto_login_info_bar_delegate.cc b/chrome/browser/ui/auto_login_info_bar_delegate.cc
|
| index a631bef2d060b48fdfa46c0358ce305d9e90656b..9f6f2e5c62ee91139d46a15108f7b57c9044adab 100644
|
| --- a/chrome/browser/ui/auto_login_info_bar_delegate.cc
|
| +++ b/chrome/browser/ui/auto_login_info_bar_delegate.cc
|
| @@ -123,13 +123,10 @@ void AutoLoginRedirector::OnUbertokenFailure(
|
| }
|
|
|
| void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) {
|
| - // The args are URL encoded, so we need to decode them before use.
|
| - std::string unescaped_args =
|
| - net::UnescapeURLComponent(args_, net::UnescapeRule::URL_SPECIAL_CHARS);
|
| // TODO(rogerta): what is the correct page transition?
|
| navigation_controller_->LoadURL(
|
| GURL(GaiaUrls::GetInstance()->merge_session_url() +
|
| - "?source=chrome&uberauth=" + token + "&" + unescaped_args),
|
| + "?source=chrome&uberauth=" + token + "&" + args_),
|
| content::Referrer(), content::PAGE_TRANSITION_AUTO_BOOKMARK,
|
| std::string());
|
| }
|
| @@ -141,11 +138,15 @@ void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) {
|
|
|
| AutoLoginInfoBarDelegate::AutoLoginInfoBarDelegate(
|
| InfoBarTabHelper* owner,
|
| - const std::string& username,
|
| - const std::string& args)
|
| + const std::string& realm,
|
| + const std::string& account,
|
| + const std::string& args,
|
| + const std::string& username)
|
| : ConfirmInfoBarDelegate(owner),
|
| - username_(username),
|
| + realm_(realm),
|
| + account_(account),
|
| args_(args),
|
| + username_(username),
|
| button_pressed_(false) {
|
| RecordHistogramAction(HISTOGRAM_SHOWN);
|
| }
|
| @@ -155,6 +156,11 @@ AutoLoginInfoBarDelegate::~AutoLoginInfoBarDelegate() {
|
| RecordHistogramAction(HISTOGRAM_IGNORED);
|
| }
|
|
|
| +AutoLoginInfoBarDelegate*
|
| + AutoLoginInfoBarDelegate::AsAutoLoginInfoBarDelegate() {
|
| + return this;
|
| +}
|
| +
|
| void AutoLoginInfoBarDelegate::InfoBarDismissed() {
|
| RecordHistogramAction(HISTOGRAM_DISMISSED);
|
| button_pressed_ = true;
|
| @@ -170,8 +176,7 @@ InfoBarDelegate::Type AutoLoginInfoBarDelegate::GetInfoBarType() const {
|
| }
|
|
|
| string16 AutoLoginInfoBarDelegate::GetMessageText() const {
|
| - return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE,
|
| - UTF8ToUTF16(username_));
|
| + return GetMessageText(username_);
|
| }
|
|
|
| string16 AutoLoginInfoBarDelegate::GetButtonLabel(
|
| @@ -197,6 +202,12 @@ bool AutoLoginInfoBarDelegate::Cancel() {
|
| return true;
|
| }
|
|
|
| +string16 AutoLoginInfoBarDelegate::GetMessageText(
|
| + const std::string& username) const {
|
| + return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE,
|
| + UTF8ToUTF16(username));
|
| +}
|
| +
|
| void AutoLoginInfoBarDelegate::RecordHistogramAction(int action) {
|
| UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action, HISTOGRAM_MAX);
|
| }
|
|
|