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

Side by Side Diff: chrome/browser/autofill/autofill_cc_infobar_delegate.cc

Issue 6262018: Cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/autofill/autofill_cc_infobar_delegate.h" 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/autofill/autofill_cc_infobar.h" 8 #include "chrome/browser/autofill/autofill_cc_infobar.h"
9 #include "chrome/browser/autofill/autofill_manager.h" 9 #include "chrome/browser/autofill/autofill_manager.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() const { 46 InfoBarDelegate::Type AutoFillCCInfoBarDelegate::GetInfoBarType() const {
47 return PAGE_ACTION_TYPE; 47 return PAGE_ACTION_TYPE;
48 } 48 }
49 49
50 string16 AutoFillCCInfoBarDelegate::GetMessageText() const { 50 string16 AutoFillCCInfoBarDelegate::GetMessageText() const {
51 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_TEXT); 51 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CC_INFOBAR_TEXT);
52 } 52 }
53 53
54 int AutoFillCCInfoBarDelegate::GetButtons() const {
55 return BUTTON_OK | BUTTON_CANCEL;
56 }
57
58 string16 AutoFillCCInfoBarDelegate::GetButtonLabel(InfoBarButton button) const { 54 string16 AutoFillCCInfoBarDelegate::GetButtonLabel(InfoBarButton button) const {
59 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? 55 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
60 IDS_AUTOFILL_CC_INFOBAR_ACCEPT : IDS_AUTOFILL_CC_INFOBAR_DENY); 56 IDS_AUTOFILL_CC_INFOBAR_ACCEPT : IDS_AUTOFILL_CC_INFOBAR_DENY);
61 } 57 }
62 58
63 bool AutoFillCCInfoBarDelegate::Accept() { 59 bool AutoFillCCInfoBarDelegate::Accept() {
64 UMA_HISTOGRAM_COUNTS("AutoFill.CCInfoBarAccepted", 1); 60 UMA_HISTOGRAM_COUNTS("AutoFill.CCInfoBarAccepted", 1);
65 if (host_) { 61 if (host_) {
66 host_->OnInfoBarClosed(true); 62 host_->OnInfoBarClosed(true);
67 host_ = NULL; 63 host_ = NULL;
(...skipping 19 matching lines...) Expand all
87 DCHECK(browser); 83 DCHECK(browser);
88 browser->OpenAutoFillHelpTabAndActivate(); 84 browser->OpenAutoFillHelpTabAndActivate();
89 return false; 85 return false;
90 } 86 }
91 87
92 #if defined(OS_WIN) 88 #if defined(OS_WIN)
93 InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() { 89 InfoBar* AutoFillCCInfoBarDelegate::CreateInfoBar() {
94 return CreateAutofillCcInfoBar(this); 90 return CreateAutofillCcInfoBar(this);
95 } 91 }
96 #endif // defined(OS_WIN) 92 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_delegate.h ('k') | chrome/browser/autofill/autofill_cc_infobar_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698