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

Unified Diff: chrome/browser/policy/policy_service_impl_unittest.cc

Issue 47513018: Make the internal storage of policy::Schemas ref counted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-policy-schema-4-new-generate
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_service_impl_unittest.cc
diff --git a/chrome/browser/policy/policy_service_impl_unittest.cc b/chrome/browser/policy/policy_service_impl_unittest.cc
index c7854d5333d9e33d65b79fbefd56306bfb56fecb..a02f38f30d6d5f0d1cb0e910acee817991d35c5c 100644
--- a/chrome/browser/policy/policy_service_impl_unittest.cc
+++ b/chrome/browser/policy/policy_service_impl_unittest.cc
@@ -627,7 +627,7 @@ TEST_F(PolicyServiceTest, RegisterPolicyDomain) {
// Register another namespace.
std::string error;
- scoped_ptr<SchemaOwner> schema = SchemaOwner::Parse(
+ Schema schema = Schema::Parse(
"{"
" \"type\":\"object\","
" \"properties\": {"
@@ -639,10 +639,10 @@ TEST_F(PolicyServiceTest, RegisterPolicyDomain) {
" \"String\": { \"type\": \"string\" }"
" }"
"}", &error);
- ASSERT_TRUE(schema);
+ ASSERT_TRUE(schema.valid()) << error;
scoped_refptr<PolicyDomainDescriptor> extensions_descriptor =
new PolicyDomainDescriptor(POLICY_DOMAIN_EXTENSIONS);
- extensions_descriptor->RegisterComponent(kExtension, schema.Pass());
+ extensions_descriptor->RegisterComponent(kExtension, schema);
EXPECT_CALL(provider0_, RegisterPolicyDomain(
scoped_refptr<const PolicyDomainDescriptor>(extensions_descriptor)));
policy_service_->RegisterPolicyDomain(extensions_descriptor);

Powered by Google App Engine
This is Rietveld 408576698