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

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

Issue 922953002: Minor infobar cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 5 years, 10 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/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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 if (!button_pressed_) 167 if (!button_pressed_)
168 RecordHistogramAction(IGNORED); 168 RecordHistogramAction(IGNORED);
169 } 169 }
170 170
171 void AutoLoginInfoBarDelegate::RecordHistogramAction(Actions action) { 171 void AutoLoginInfoBarDelegate::RecordHistogramAction(Actions action) {
172 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action, 172 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action,
173 HISTOGRAM_BOUNDING_VALUE); 173 HISTOGRAM_BOUNDING_VALUE);
174 } 174 }
175 175
176 infobars::InfoBarDelegate::Type AutoLoginInfoBarDelegate::GetInfoBarType()
177 const {
178 return PAGE_ACTION_TYPE;
179 }
180
181 int AutoLoginInfoBarDelegate::GetIconID() const {
182 return IDR_INFOBAR_AUTOLOGIN;
183 }
184
176 void AutoLoginInfoBarDelegate::InfoBarDismissed() { 185 void AutoLoginInfoBarDelegate::InfoBarDismissed() {
177 RecordHistogramAction(DISMISSED); 186 RecordHistogramAction(DISMISSED);
178 button_pressed_ = true; 187 button_pressed_ = true;
179 } 188 }
180 189
181 int AutoLoginInfoBarDelegate::GetIconID() const {
182 return IDR_INFOBAR_AUTOLOGIN;
183 }
184
185 infobars::InfoBarDelegate::Type AutoLoginInfoBarDelegate::GetInfoBarType()
186 const {
187 return PAGE_ACTION_TYPE;
188 }
189
190 AutoLoginInfoBarDelegate* 190 AutoLoginInfoBarDelegate*
191 AutoLoginInfoBarDelegate::AsAutoLoginInfoBarDelegate() { 191 AutoLoginInfoBarDelegate::AsAutoLoginInfoBarDelegate() {
192 return this; 192 return this;
193 } 193 }
194 194
195 base::string16 AutoLoginInfoBarDelegate::GetMessageText() const { 195 base::string16 AutoLoginInfoBarDelegate::GetMessageText() const {
196 return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE, 196 return l10n_util::GetStringFUTF16(IDS_AUTOLOGIN_INFOBAR_MESSAGE,
197 base::UTF8ToUTF16(params_.username)); 197 base::UTF8ToUTF16(params_.username));
198 } 198 }
199 199
(...skipping 22 matching lines...) Expand all
222 RecordHistogramAction(REJECTED); 222 RecordHistogramAction(REJECTED);
223 button_pressed_ = true; 223 button_pressed_ = true;
224 return true; 224 return true;
225 } 225 }
226 226
227 void AutoLoginInfoBarDelegate::GoogleSignedOut( 227 void AutoLoginInfoBarDelegate::GoogleSignedOut(
228 const std::string& account_id, 228 const std::string& account_id,
229 const std::string& username) { 229 const std::string& username) {
230 infobar()->RemoveSelf(); 230 infobar()->RemoveSelf();
231 } 231 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/auto_login_infobar_delegate.h ('k') | chrome/browser/ui/cocoa/keystone_infobar_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698