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

Unified Diff: components/policy/core/common/configuration_policy_provider_test.h

Issue 2414663002: Fix log spew for "_comment..." policies. (Closed)
Patch Set: Rename EraseGeneric() to FilterErase(). Created 4 years, 2 months 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
Index: components/policy/core/common/configuration_policy_provider_test.h
diff --git a/components/policy/core/common/configuration_policy_provider_test.h b/components/policy/core/common/configuration_policy_provider_test.h
index 80bdd9d282654886fe565335be97b44d5e2a8b30..5dafa89d4a2446698a973df92c23142946922b4d 100644
--- a/components/policy/core/common/configuration_policy_provider_test.h
+++ b/components/policy/core/common/configuration_policy_provider_test.h
@@ -35,7 +35,6 @@ class ConfigurationPolicyProvider;
namespace test_keys {
-// Key constants for general use.
extern const char kKeyString[];
extern const char kKeyBoolean[];
extern const char kKeyInteger[];
@@ -91,17 +90,9 @@ class PolicyProviderTestHarness {
scoped_refptr<base::SequencedTaskRunner> task_runner) = 0;
// Returns the policy level, scope and source set by the policy provider.
- PolicyLevel policy_level() const { return level_; }
- PolicyScope policy_scope() const { return scope_; }
- PolicySource policy_source() const { return source_; }
-
- // Returns policy keys and matching schema.
- const char* key_string() const { return key_string_; }
- const char* key_boolean() const { return key_boolean_; }
- const char* key_integer() const { return key_integer_; }
- const char* key_stringlist() const { return key_stringlist_; }
- const char* key_dictionary() const { return key_dictionary_; }
- const char* test_schema() const { return test_schema_; }
+ PolicyLevel policy_level() const;
+ PolicyScope policy_scope() const;
+ PolicySource policy_source() const;
// Helpers to configure the environment the policy provider reads from.
virtual void InstallEmptyPolicy() = 0;
@@ -121,14 +112,6 @@ class PolicyProviderTestHarness {
// should override this method; the default just makes the test fail.
virtual void Install3rdPartyPolicy(const base::DictionaryValue* policies);
- protected:
- const char* key_string_;
- const char* key_boolean_;
- const char* key_integer_;
- const char* key_stringlist_;
- const char* key_dictionary_;
- const char* test_schema_;
-
private:
PolicyLevel level_;
PolicyScope scope_;
@@ -159,7 +142,7 @@ class ConfigurationPolicyProviderTest
const base::Value& expected_value,
base::Closure install_value);
- std::unique_ptr<PolicyProviderTestHarness> harness_;
+ std::unique_ptr<PolicyProviderTestHarness> test_harness_;
std::unique_ptr<ConfigurationPolicyProvider> provider_;
private:

Powered by Google App Engine
This is Rietveld 408576698