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

Unified Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 801053003: Never display unauthorized plugin info bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: can remove more stuff Created 6 years 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/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_infobar_delegates.cc
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc
index ca8efaf8b64f0a6eee11c85d69958b1e1df05a5e..2d2271cd9c94c8b18fd25b0a7567004597fc085c 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -81,92 +81,6 @@ base::string16 PluginInfoBarDelegate::GetLinkText() const {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
-
-// UnauthorizedPluginInfoBarDelegate ------------------------------------------
sky 2014/12/15 16:45:40 If there are any dead includes please nuke them.
Will Harris 2014/12/15 19:23:46 Done.
-
-// static
-void UnauthorizedPluginInfoBarDelegate::Create(
- InfoBarService* infobar_service,
- HostContentSettingsMap* content_settings,
- const base::string16& name,
- const std::string& identifier) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new UnauthorizedPluginInfoBarDelegate(
- content_settings, name, identifier))));
-
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown"));
- std::string utf8_name(base::UTF16ToUTF8(name));
- if (utf8_name == PluginMetadata::kJavaGroupName) {
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown.Java"));
- } else if (utf8_name == PluginMetadata::kQuickTimeGroupName) {
- content::RecordAction(
- UserMetricsAction("BlockedPluginInfobar.Shown.QuickTime"));
- } else if (utf8_name == PluginMetadata::kShockwaveGroupName) {
- content::RecordAction(
- UserMetricsAction("BlockedPluginInfobar.Shown.Shockwave"));
- } else if (utf8_name == PluginMetadata::kRealPlayerGroupName) {
- content::RecordAction(
- UserMetricsAction("BlockedPluginInfobar.Shown.RealPlayer"));
- } else if (utf8_name == PluginMetadata::kWindowsMediaPlayerGroupName) {
- content::RecordAction(
- UserMetricsAction("BlockedPluginInfobar.Shown.WindowsMediaPlayer"));
- }
-}
-
-UnauthorizedPluginInfoBarDelegate::UnauthorizedPluginInfoBarDelegate(
- HostContentSettingsMap* content_settings,
- const base::string16& name,
- const std::string& identifier)
- : PluginInfoBarDelegate(identifier),
- content_settings_(content_settings),
- name_(name) {
-}
-
-UnauthorizedPluginInfoBarDelegate::~UnauthorizedPluginInfoBarDelegate() {
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Closed"));
-}
-
-std::string UnauthorizedPluginInfoBarDelegate::GetLearnMoreURL() const {
- return chrome::kBlockedPluginLearnMoreURL;
-}
-
-base::string16 UnauthorizedPluginInfoBarDelegate::GetMessageText() const {
- return l10n_util::GetStringFUTF16(IDS_PLUGIN_NOT_AUTHORIZED, name_);
-}
-
-base::string16 UnauthorizedPluginInfoBarDelegate::GetButtonLabel(
- InfoBarButton button) const {
- return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
- IDS_PLUGIN_ENABLE_TEMPORARILY : IDS_PLUGIN_ENABLE_ALWAYS);
-}
-
-bool UnauthorizedPluginInfoBarDelegate::Accept() {
- content::RecordAction(
- UserMetricsAction("BlockedPluginInfobar.AllowThisTime"));
- LoadBlockedPlugins();
- return true;
-}
-
-bool UnauthorizedPluginInfoBarDelegate::Cancel() {
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.AlwaysAllow"));
- const GURL& url = InfoBarService::WebContentsFromInfoBar(infobar())->GetURL();
- content_settings_->AddExceptionForURL(url, url, CONTENT_SETTINGS_TYPE_PLUGINS,
- CONTENT_SETTING_ALLOW);
- LoadBlockedPlugins();
- return true;
-}
-
-void UnauthorizedPluginInfoBarDelegate::InfoBarDismissed() {
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Dismissed"));
-}
-
-bool UnauthorizedPluginInfoBarDelegate::LinkClicked(
- WindowOpenDisposition disposition) {
- content::RecordAction(UserMetricsAction("BlockedPluginInfobar.LearnMore"));
- return PluginInfoBarDelegate::LinkClicked(disposition);
-}
-
-
#if defined(ENABLE_PLUGIN_INSTALLATION)
// OutdatedPluginInfoBarDelegate ----------------------------------------------
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.h ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698