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

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

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming back to GetIcon() Created 7 years, 7 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 (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/autofill/autofill_cc_infobar_delegate.h" 5 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "components/autofill/browser/credit_card.h" 9 #include "components/autofill/browser/credit_card.h"
10 #include "components/autofill/browser/personal_data_manager.h" 10 #include "components/autofill/browser/personal_data_manager.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 DCHECK(!had_user_interaction_); 59 DCHECK(!had_user_interaction_);
60 60
61 metric_logger_->LogCreditCardInfoBarMetric(user_action); 61 metric_logger_->LogCreditCardInfoBarMetric(user_action);
62 had_user_interaction_ = true; 62 had_user_interaction_ = true;
63 } 63 }
64 64
65 void AutofillCCInfoBarDelegate::InfoBarDismissed() { 65 void AutofillCCInfoBarDelegate::InfoBarDismissed() {
66 LogUserAction(AutofillMetrics::INFOBAR_DENIED); 66 LogUserAction(AutofillMetrics::INFOBAR_DENIED);
67 } 67 }
68 68
69 gfx::Image* AutofillCCInfoBarDelegate::GetIcon() const { 69 int AutofillCCInfoBarDelegate::GetIconID() const {
70 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 70 return IDR_INFOBAR_AUTOFILL;
71 IDR_INFOBAR_AUTOFILL);
72 } 71 }
73 72
74 InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const { 73 InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const {
75 return PAGE_ACTION_TYPE; 74 return PAGE_ACTION_TYPE;
76 } 75 }
77 76
78 bool AutofillCCInfoBarDelegate::ShouldExpireInternal( 77 bool AutofillCCInfoBarDelegate::ShouldExpireInternal(
79 const content::LoadCommittedDetails& details) const { 78 const content::LoadCommittedDetails& details) const {
80 // The user has submitted a form, causing the page to navigate elsewhere. We 79 // The user has submitted a form, causing the page to navigate elsewhere. We
81 // don't want the infobar to be expired at this point, because the user won't 80 // don't want the infobar to be expired at this point, because the user won't
(...skipping 28 matching lines...) Expand all
110 109
111 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { 110 bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
112 web_contents()->OpenURL(content::OpenURLParams( 111 web_contents()->OpenURL(content::OpenURLParams(
113 GURL(autofill::kHelpURL), content::Referrer(), 112 GURL(autofill::kHelpURL), content::Referrer(),
114 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 113 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
115 content::PAGE_TRANSITION_LINK, false)); 114 content::PAGE_TRANSITION_LINK, false));
116 return false; 115 return false;
117 } 116 }
118 117
119 } // namespace autofill 118 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698