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

Side by Side Diff: chrome/browser/plugins/plugin_prefs_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_prefs.h" 5 #include "chrome/browser/plugins/plugin_prefs.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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void GotPlugins(const base::Closure& quit_closure, 52 void GotPlugins(const base::Closure& quit_closure,
53 const std::vector<content::WebPluginInfo>& plugins) { 53 const std::vector<content::WebPluginInfo>& plugins) {
54 quit_closure.Run(); 54 quit_closure.Run();
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 class PluginPrefsTest : public ::testing::Test { 59 class PluginPrefsTest : public ::testing::Test {
60 public: 60 public:
61 virtual void SetUp() override { 61 void SetUp() override { plugin_prefs_ = new PluginPrefs(); }
62 plugin_prefs_ = new PluginPrefs();
63 }
64 62
65 void SetPolicyEnforcedPluginPatterns( 63 void SetPolicyEnforcedPluginPatterns(
66 const std::set<base::string16>& disabled, 64 const std::set<base::string16>& disabled,
67 const std::set<base::string16>& disabled_exceptions, 65 const std::set<base::string16>& disabled_exceptions,
68 const std::set<base::string16>& enabled) { 66 const std::set<base::string16>& enabled) {
69 plugin_prefs_->SetPolicyEnforcedPluginPatterns( 67 plugin_prefs_->SetPolicyEnforcedPluginPatterns(
70 disabled, disabled_exceptions, enabled); 68 disabled, disabled_exceptions, enabled);
71 } 69 }
72 70
73 protected: 71 protected:
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); 272 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2));
275 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 273 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
276 274
277 EnablePluginSynchronously(true, bundled_plugin.path, true); 275 EnablePluginSynchronously(true, bundled_plugin.path, true);
278 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1)); 276 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1));
279 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); 277 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2));
280 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 278 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
281 } 279 }
282 280
283 #endif 281 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698