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

Side by Side Diff: chrome/browser/ui/auto_login_infobar_delegate.cc

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/auto_login_infobar_delegate.h" 5 #include "chrome/browser/ui/auto_login_infobar_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return PAGE_ACTION_TYPE; 174 return PAGE_ACTION_TYPE;
175 } 175 }
176 176
177 AutoLoginInfoBarDelegate* 177 AutoLoginInfoBarDelegate*
178 AutoLoginInfoBarDelegate::AsAutoLoginInfoBarDelegate() { 178 AutoLoginInfoBarDelegate::AsAutoLoginInfoBarDelegate() {
179 return this; 179 return this;
180 } 180 }
181 181
182 base::string16 AutoLoginInfoBarDelegate::GetMessageText() const { 182 base::string16 AutoLoginInfoBarDelegate::GetMessageText() const {
183 return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE, 183 return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE,
184 UTF8ToUTF16(params_.username)); 184 base::UTF8ToUTF16(params_.username));
185 } 185 }
186 186
187 base::string16 AutoLoginInfoBarDelegate::GetButtonLabel( 187 base::string16 AutoLoginInfoBarDelegate::GetButtonLabel(
188 InfoBarButton button) const { 188 InfoBarButton button) const {
189 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? 189 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
190 IDS_AUTOLOGIN_INFOBAR_OK_BUTTON : IDS_AUTOLOGIN_INFOBAR_CANCEL_BUTTON); 190 IDS_AUTOLOGIN_INFOBAR_OK_BUTTON : IDS_AUTOLOGIN_INFOBAR_CANCEL_BUTTON);
191 } 191 }
192 192
193 bool AutoLoginInfoBarDelegate::Accept() { 193 bool AutoLoginInfoBarDelegate::Accept() {
194 // AutoLoginRedirector deletes itself. 194 // AutoLoginRedirector deletes itself.
(...skipping 17 matching lines...) Expand all
212 const content::NotificationSource& source, 212 const content::NotificationSource& source,
213 const content::NotificationDetails& details) { 213 const content::NotificationDetails& details) {
214 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type); 214 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type);
215 infobar()->RemoveSelf(); 215 infobar()->RemoveSelf();
216 } 216 }
217 217
218 void AutoLoginInfoBarDelegate::RecordHistogramAction(Actions action) { 218 void AutoLoginInfoBarDelegate::RecordHistogramAction(Actions action) {
219 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action, 219 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action,
220 HISTOGRAM_BOUNDING_VALUE); 220 HISTOGRAM_BOUNDING_VALUE);
221 } 221 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/shelf_browsertest.cc ('k') | chrome/browser/ui/autofill/account_chooser_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698