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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 host, "bar", CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, false, false); | 316 host, "bar", CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, false, false); |
317 | 317 |
318 // Otherwise, use the default. | 318 // Otherwise, use the default. |
319 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, | 319 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, |
320 true, false); | 320 true, false); |
321 | 321 |
322 // Block plugins via policy. | 322 // Block plugins via policy. |
323 sync_preferences::TestingPrefServiceSyncable* prefs = | 323 sync_preferences::TestingPrefServiceSyncable* prefs = |
324 profile()->GetTestingPrefService(); | 324 profile()->GetTestingPrefService(); |
325 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, | 325 prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, |
326 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); | 326 new base::Value(CONTENT_SETTING_BLOCK)); |
327 | 327 |
328 // All plugins should be blocked now. | 328 // All plugins should be blocked now. |
329 VerifyPluginContentSetting(host, "foo", CONTENT_SETTING_BLOCK, true, true); | 329 VerifyPluginContentSetting(host, "foo", CONTENT_SETTING_BLOCK, true, true); |
330 VerifyPluginContentSetting(host, "bar", CONTENT_SETTING_BLOCK, true, true); | 330 VerifyPluginContentSetting(host, "bar", CONTENT_SETTING_BLOCK, true, true); |
331 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, | 331 VerifyPluginContentSetting(unmatched_host, "bar", CONTENT_SETTING_BLOCK, |
332 true, true); | 332 true, true); |
333 } | 333 } |
OLD | NEW |