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

Unified Diff: chrome/browser/banners/app_banner_infobar_delegate_desktop.cc

Issue 1163323004: Removing unecessary button label (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/banners/app_banner_infobar_delegate_desktop.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
index ef551c53b76e8ae865fd3957e1ee5b17ccaa74fd..e959a879835b3a56fc140a74caa3c338e0778404 100644
--- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
+++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
@@ -61,11 +61,13 @@ base::string16 AppBannerInfoBarDelegateDesktop::GetMessageText() const {
return l10n_util::GetStringUTF16(IDS_ADD_TO_SHELF_INFOBAR_TITLE);
}
+int AppBannerInfoBarDelegateDesktop::GetButtons() const {
+ return BUTTON_OK;
+}
+
base::string16 AppBannerInfoBarDelegateDesktop::GetButtonLabel(
InfoBarButton button) const {
- return l10n_util::GetStringUTF16((button == BUTTON_OK)
- ? IDS_ADD_TO_SHELF_INFOBAR_ADD_BUTTON
- : IDS_ADD_TO_SHELF_INFOBAR_NEVER_BUTTON);
+ return l10n_util::GetStringUTF16(IDS_ADD_TO_SHELF_INFOBAR_ADD_BUTTON);
}
bool AppBannerInfoBarDelegateDesktop::Accept() {
@@ -76,7 +78,7 @@ bool AppBannerInfoBarDelegateDesktop::Accept() {
return true;
}
-bool AppBannerInfoBarDelegateDesktop::Cancel() {
+void AppBannerInfoBarDelegateDesktop::InfoBarDismissed() {
content::WebContents* web_contents =
InfoBarService::WebContentsFromInfoBar(infobar());
if (web_contents) {
@@ -91,11 +93,6 @@ bool AppBannerInfoBarDelegateDesktop::Cancel() {
web_contents, web_manifest_.start_url.spec(),
AppBannerSettingsHelper::WEB);
}
- return true;
-}
-
-void AppBannerInfoBarDelegateDesktop::InfoBarDismissed() {
- Cancel();
}
} // namespace banners
« no previous file with comments | « chrome/browser/banners/app_banner_infobar_delegate_desktop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698