summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 13:40:40 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 13:40:40 +0000
commit56f1a6ba817c77388d9df86c0f23db4dde7e0934 (patch)
treebd8c938c53f69f2ae1e104cf90cad49511e639b3 /chrome/browser/views
parent763e638fc941c4295feb961ea1c9b127de28de6a (diff)
downloadchromium_src-56f1a6ba817c77388d9df86c0f23db4dde7e0934.zip
chromium_src-56f1a6ba817c77388d9df86c0f23db4dde7e0934.tar.gz
chromium_src-56f1a6ba817c77388d9df86c0f23db4dde7e0934.tar.bz2
[Win] Add per-plugin exceptions to content settings.
Screenshot: http://imgur.com/yxEzO.png BUG=39252 TEST=PluginExceptionsTableModel.* Review URL: http://codereview.chromium.org/3307014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/options/content_filter_page_view.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/chrome/browser/views/options/content_filter_page_view.cc b/chrome/browser/views/options/content_filter_page_view.cc
index c017558..ac2ab38 100644
--- a/chrome/browser/views/options/content_filter_page_view.cc
+++ b/chrome/browser/views/options/content_filter_page_view.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/notification_exceptions_table_model.h"
+#include "chrome/browser/plugin_exceptions_table_model.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/views/options/exceptions_view.h"
#include "chrome/browser/views/options/simple_content_exceptions_view.h"
@@ -190,12 +191,27 @@ void ContentFilterPageView::ButtonPressed(views::Button* sender,
profile()->GetDesktopNotificationService()),
IDS_NOTIFICATIONS_EXCEPTION_TITLE);
} else {
- ExceptionsView::ShowExceptionsWindow(GetWindow()->GetNativeWindow(),
- profile()->GetHostContentSettingsMap(),
+ HostContentSettingsMap* settings = profile()->GetHostContentSettingsMap();
+ HostContentSettingsMap* otr_settings =
profile()->HasOffTheRecordProfile() ?
profile()->GetOffTheRecordProfile()->GetHostContentSettingsMap() :
- NULL,
- content_type_);
+ NULL;
+ if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableResourceContentSettings)) {
+ PluginExceptionsTableModel* model =
+ new PluginExceptionsTableModel(settings, otr_settings);
+ model->LoadSettings();
+ SimpleContentExceptionsView::ShowExceptionsWindow(
+ GetWindow()->GetNativeWindow(),
+ model,
+ IDS_PLUGINS_EXCEPTION_TITLE);
+ } else {
+ ExceptionsView::ShowExceptionsWindow(GetWindow()->GetNativeWindow(),
+ settings,
+ otr_settings,
+ content_type_);
+ }
}
return;
}