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

Side by Side Diff: components/policy/core/common/configuration_policy_provider_test.h

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "components/policy/core/common/policy_types.h" 15 #include "components/policy/core/common/policy_types.h"
16 #include "components/policy/core/common/schema.h" 16 #include "components/policy/core/common/schema.h"
17 #include "components/policy/core/common/schema_registry.h" 17 #include "components/policy/core/common/schema_registry.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 namespace base { 20 namespace base {
21 class DictionaryValue; 21 class DictionaryValue;
22 class ListValue; 22 class ListValue;
23 class SequencedTaskRunner; 23 class SequencedTaskRunner;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 void SetUp() override; 127 void SetUp() override;
128 void TearDown() override; 128 void TearDown() override;
129 129
130 // Installs a valid policy and checks whether the provider returns the 130 // Installs a valid policy and checks whether the provider returns the
131 // |expected_value|. 131 // |expected_value|.
132 void CheckValue(const char* policy_name, 132 void CheckValue(const char* policy_name,
133 const base::Value& expected_value, 133 const base::Value& expected_value,
134 base::Closure install_value); 134 base::Closure install_value);
135 135
136 scoped_ptr<PolicyProviderTestHarness> test_harness_; 136 std::unique_ptr<PolicyProviderTestHarness> test_harness_;
137 scoped_ptr<ConfigurationPolicyProvider> provider_; 137 std::unique_ptr<ConfigurationPolicyProvider> provider_;
138 138
139 private: 139 private:
140 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderTest); 140 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderTest);
141 }; 141 };
142 142
143 // An extension of ConfigurationPolicyProviderTest that also tests loading of 143 // An extension of ConfigurationPolicyProviderTest that also tests loading of
144 // 3rd party policy. Policy provider implementations that support loading of 144 // 3rd party policy. Policy provider implementations that support loading of
145 // 3rd party policy should also instantiate these tests. 145 // 3rd party policy should also instantiate these tests.
146 class Configuration3rdPartyPolicyProviderTest 146 class Configuration3rdPartyPolicyProviderTest
147 : public ConfigurationPolicyProviderTest { 147 : public ConfigurationPolicyProviderTest {
148 protected: 148 protected:
149 Configuration3rdPartyPolicyProviderTest(); 149 Configuration3rdPartyPolicyProviderTest();
150 virtual ~Configuration3rdPartyPolicyProviderTest(); 150 virtual ~Configuration3rdPartyPolicyProviderTest();
151 151
152 private: 152 private:
153 DISALLOW_COPY_AND_ASSIGN(Configuration3rdPartyPolicyProviderTest); 153 DISALLOW_COPY_AND_ASSIGN(Configuration3rdPartyPolicyProviderTest);
154 }; 154 };
155 155
156 } // namespace policy 156 } // namespace policy
157 157
158 #endif // COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 158 #endif // COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/configuration_policy_provider.cc ('k') | components/policy/core/common/external_data_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698