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

Side by Side Diff: components/policy/core/common/mac_util_unittest.cc

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 7 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 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 "components/policy/core/common/mac_util.h" 5 #include "components/policy/core/common/mac_util.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 EXPECT_EQ(root.size(), list.GetSize()); 45 EXPECT_EQ(root.size(), list.GetSize());
46 list.Append(root.DeepCopy()); 46 list.Append(root.DeepCopy());
47 root.Set("list", list.DeepCopy()); 47 root.Set("list", list.DeepCopy());
48 48
49 // base::Value::TYPE_DICTIONARY 49 // base::Value::TYPE_DICTIONARY
50 base::DictionaryValue dict; 50 base::DictionaryValue dict;
51 root.Set("emptyd", dict.DeepCopy()); 51 root.Set("emptyd", dict.DeepCopy());
52 // Very meta. 52 // Very meta.
53 root.Set("dict", root.DeepCopy()); 53 root.Set("dict", root.DeepCopy());
54 54
55 base::ScopedCFTypeRef<CFPropertyListRef> property(ValueToProperty(&root)); 55 base::ScopedCFTypeRef<CFPropertyListRef> property(ValueToProperty(root));
56 ASSERT_TRUE(property); 56 ASSERT_TRUE(property);
57 std::unique_ptr<base::Value> value = PropertyToValue(property); 57 std::unique_ptr<base::Value> value = PropertyToValue(property);
58 ASSERT_TRUE(value); 58 ASSERT_TRUE(value);
59 EXPECT_TRUE(root.Equals(value.get())); 59 EXPECT_TRUE(root.Equals(value.get()));
60 } 60 }
61 61
62 } // namespace policy 62 } // namespace policy
OLDNEW
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.cc ('k') | components/policy/core/common/policy_loader_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698