summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 16:33:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 16:33:50 +0000
commit96d1ed0c4184d446832d5b04ed4f02994b79ae03 (patch)
tree7864552190f6beaec44d46d26a617954a2fc2eb9 /chrome/browser/views
parent88dc06904f5ebf68d962ac3e5c7a77ca64ac4ec0 (diff)
downloadchromium_src-96d1ed0c4184d446832d5b04ed4f02994b79ae03.zip
chromium_src-96d1ed0c4184d446832d5b04ed4f02994b79ae03.tar.gz
chromium_src-96d1ed0c4184d446832d5b04ed4f02994b79ae03.tar.bz2
Get rid of the ERROR_TYPE from InfoBarDelegate.
Reason: This type is not really used and is just adding duplicated code. We are using the same color scheme for both WARNING_TYPE and ERROR_TYPE, so there is no really reason to both exists. Staing with WARNING_TYPE because it used more than ERROR_TYPE and looks like it captures the idea better than ERROR_TYPE. BUG=39102 TEST=trybots Review URL: http://codereview.chromium.org/3128007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/infobars/infobars.cc12
-rw-r--r--chrome/browser/views/infobars/translate_infobar_base.cc2
2 files changed, 3 insertions, 11 deletions
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index a9e1688..58a4db6 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -38,10 +38,6 @@ static const SkColor kWarningBackgroundColorTop = SkColorSetRGB(255, 242, 183);
static const SkColor kWarningBackgroundColorBottom =
SkColorSetRGB(250, 230, 145);
-static const SkColor kErrorBackgroundColorTop = kWarningBackgroundColorTop;
-static const SkColor kErrorBackgroundColorBottom =
- kWarningBackgroundColorBottom;
-
static const SkColor kPageActionBackgroundColorTop =
SkColorSetRGB(218, 231, 249);
static const SkColor kPageActionBackgroundColorBottom =
@@ -56,9 +52,8 @@ InfoBarBackground::InfoBarBackground(InfoBarDelegate::Type infobar_type) {
SkColor bottom_color;
switch (infobar_type) {
case InfoBarDelegate::WARNING_TYPE:
- case InfoBarDelegate::ERROR_TYPE:
- top_color = kErrorBackgroundColorTop;
- bottom_color = kErrorBackgroundColorBottom;
+ top_color = kWarningBackgroundColorTop;
+ bottom_color = kWarningBackgroundColorBottom;
break;
case InfoBarDelegate::PAGE_ACTION_TYPE:
top_color = kPageActionBackgroundColorTop;
@@ -102,9 +97,6 @@ InfoBar::InfoBar(InfoBarDelegate* delegate)
case InfoBarDelegate::WARNING_TYPE:
SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_INFOBAR_WARNING));
break;
- case InfoBarDelegate::ERROR_TYPE:
- SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_INFOBAR_ERROR));
- break;
case InfoBarDelegate::PAGE_ACTION_TYPE:
SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_INFOBAR_PAGE_ACTION));
break;
diff --git a/chrome/browser/views/infobars/translate_infobar_base.cc b/chrome/browser/views/infobars/translate_infobar_base.cc
index 50c7120..4eb0bdd 100644
--- a/chrome/browser/views/infobars/translate_infobar_base.cc
+++ b/chrome/browser/views/infobars/translate_infobar_base.cc
@@ -21,7 +21,7 @@ TranslateInfoBarBase::TranslateInfoBarBase(
TranslateInfoBarDelegate* delegate)
: InfoBar(delegate),
normal_background_(InfoBarDelegate::PAGE_ACTION_TYPE),
- error_background_(InfoBarDelegate::ERROR_TYPE) {
+ error_background_(InfoBarDelegate::WARNING_TYPE) {
icon_ = new views::ImageView;
SkBitmap* image = delegate->GetIcon();
if (image)