OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/plugins/plugin_info_message_filter.h" | 5 #include "chrome/browser/plugins/plugin_info_message_filter.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 host, "bar", CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, false, false); | 263 host, "bar", CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, false, false); |
264 | 264 |
265 // Otherwise, use the default. | 265 // Otherwise, use the default. |
266 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, | 266 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, |
267 true, false); | 267 true, false); |
268 | 268 |
269 // Block plugins via policy. | 269 // Block plugins via policy. |
270 sync_preferences::TestingPrefServiceSyncable* prefs = | 270 sync_preferences::TestingPrefServiceSyncable* prefs = |
271 profile()->GetTestingPrefService(); | 271 profile()->GetTestingPrefService(); |
272 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, | 272 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, |
273 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); | 273 new base::Value(CONTENT_SETTING_BLOCK)); |
274 | 274 |
275 // All plugins should be blocked now. | 275 // All plugins should be blocked now. |
276 VerifyPluginContentSetting(host, "foo", CONTENT_SETTING_BLOCK, true, true); | 276 VerifyPluginContentSetting(host, "foo", CONTENT_SETTING_BLOCK, true, true); |
277 VerifyPluginContentSetting(host, "bar", CONTENT_SETTING_BLOCK, true, true); | 277 VerifyPluginContentSetting(host, "bar", CONTENT_SETTING_BLOCK, true, true); |
278 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, | 278 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, |
279 true, true); | 279 true, true); |
280 } | 280 } |
OLD | NEW |