summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/theme_installed_infobar_delegate.h
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 18:23:18 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 18:23:18 +0000
commit8fd16f505f13dc080adc7a1aaa1f64fc7fe17bd7 (patch)
tree3b3810f4e96ba1f76a19b91831e8e18c8ac7e1f8 /chrome/browser/extensions/theme_installed_infobar_delegate.h
parent42f80df44247451f45b087237136560e06c3bb5f (diff)
downloadchromium_src-8fd16f505f13dc080adc7a1aaa1f64fc7fe17bd7.zip
chromium_src-8fd16f505f13dc080adc7a1aaa1f64fc7fe17bd7.tar.gz
chromium_src-8fd16f505f13dc080adc7a1aaa1f64fc7fe17bd7.tar.bz2
Before creating a theme info bar, check if one is already visible for the same theme.
(landing for satish@chromium.org, original http://codereview.chromium.org/1745003/show) This allows user to easily undo a theme install if they accidentally installed the same theme multiple times. BUG=40856 TEST=visit the themes gallery, install the same theme twice and hit 'Undo' in the theme info bar to verify that it rolls back to the correct previous theme. Review URL: http://codereview.chromium.org/1771001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/theme_installed_infobar_delegate.h')
-rw-r--r--chrome/browser/extensions/theme_installed_infobar_delegate.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h
index beb99c6..7674a4c 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.h
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -30,6 +30,10 @@ class ThemeInstalledInfoBarDelegate : public ConfirmInfoBarDelegate,
ConfirmInfoBarDelegate::InfoBarButton button) const;
virtual bool Cancel();
+ // Returns true if the given theme is the same as the one associated with this
+ // info bar.
+ bool MatchesTheme(Extension* theme);
+
// NotificationObserver implementation.
virtual void Observe(NotificationType type,
const NotificationSource& source,