diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 00:50:26 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-30 00:50:26 +0000 |
commit | e45eb87dc64d6ae045bf82b229a4a0902b013ab3 (patch) | |
tree | 22ae4a0b3116a729b2f1996fab999d4555903849 /chrome/browser/plugin_observer.cc | |
parent | 4968da9d1a6c276d520ae8ae15a65ff54a2dee05 (diff) | |
download | chromium_src-e45eb87dc64d6ae045bf82b229a4a0902b013ab3.zip chromium_src-e45eb87dc64d6ae045bf82b229a4a0902b013ab3.tar.gz chromium_src-e45eb87dc64d6ae045bf82b229a4a0902b013ab3.tar.bz2 |
Re-order the "Run this time" and "Update..." buttons as additional attempt to
try and put users in the right direction.
R=bauerb@chromium.org
Review URL: http://codereview.chromium.org/6718038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_observer.cc')
-rw-r--r-- | chrome/browser/plugin_observer.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc index 1db2ff2..ffc0961 100644 --- a/chrome/browser/plugin_observer.cc +++ b/chrome/browser/plugin_observer.cc @@ -240,22 +240,25 @@ string16 OutdatedPluginInfoBarDelegate::GetMessageText() const { string16 OutdatedPluginInfoBarDelegate::GetButtonLabel( InfoBarButton button) const { return l10n_util::GetStringUTF16((button == BUTTON_OK) ? - IDS_PLUGIN_UPDATE : IDS_PLUGIN_ENABLE_TEMPORARILY); + IDS_PLUGIN_ENABLE_TEMPORARILY : IDS_PLUGIN_UPDATE); } bool OutdatedPluginInfoBarDelegate::Accept() { + UserMetrics::RecordAction( + UserMetricsAction("OutdatedPluginInfobar.AllowThisTime")); + // This is intentional; the base class cancel is mapped to running all + // plug-ins and closing the infobar. We've rewired Accept() and Cancel() in + // the "outdated" case so that the first button is "Update..." + return PluginInfoBarDelegate::Cancel(); +} + +bool OutdatedPluginInfoBarDelegate::Cancel() { UserMetrics::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Update")); tab_contents_->OpenURL(update_url_, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); return false; } -bool OutdatedPluginInfoBarDelegate::Cancel() { - UserMetrics::RecordAction( - UserMetricsAction("OutdatedPluginInfobar.AllowThisTime")); - return PluginInfoBarDelegate::Cancel(); -} - void OutdatedPluginInfoBarDelegate::InfoBarDismissed() { UserMetrics::RecordAction( UserMetricsAction("OutdatedPluginInfobar.Dismissed")); |