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

Side by Side Diff: chrome/browser/policy/policy_loader_mac_unittest.cc

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | Annotate | Revision Log
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 <CoreFoundation/CoreFoundation.h> 5 #include <CoreFoundation/CoreFoundation.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/mac/scoped_cftyperef.h" 8 #include "base/mac/scoped_cftyperef.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/policy/async_policy_provider.h" 11 #include "chrome/browser/policy/async_policy_provider.h"
12 #include "chrome/browser/policy/configuration_policy_provider_test.h" 12 #include "chrome/browser/policy/configuration_policy_provider_test.h"
13 #include "chrome/browser/policy/policy_bundle.h" 13 #include "chrome/browser/policy/policy_bundle.h"
14 #include "chrome/browser/policy/policy_loader_mac.h" 14 #include "chrome/browser/policy/policy_loader_mac.h"
15 #include "chrome/browser/policy/policy_map.h" 15 #include "chrome/browser/policy/policy_map.h"
16 #include "chrome/browser/policy/preferences_mock_mac.h" 16 #include "chrome/browser/policy/preferences_mock_mac.h"
17 #include "policy/policy_constants.h" 17 #include "policy/policy_constants.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 using base::mac::ScopedCFTypeRef; 20 using base::ScopedCFTypeRef;
21 21
22 namespace policy { 22 namespace policy {
23 23
24 namespace { 24 namespace {
25 25
26 // Converts a base::Value to the equivalent CFPropertyListRef. 26 // Converts a base::Value to the equivalent CFPropertyListRef.
27 // The returned value is owned by the caller. 27 // The returned value is owned by the caller.
28 CFPropertyListRef CreatePropertyFromValue(const base::Value* value) { 28 CFPropertyListRef CreatePropertyFromValue(const base::Value* value) {
29 switch (value->GetType()) { 29 switch (value->GetType()) {
30 case base::Value::TYPE_NULL: 30 case base::Value::TYPE_NULL:
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 ScopedCFTypeRef<CFPropertyListRef> property(CreatePropertyFromValue(&root)); 326 ScopedCFTypeRef<CFPropertyListRef> property(CreatePropertyFromValue(&root));
327 ASSERT_TRUE(property); 327 ASSERT_TRUE(property);
328 scoped_ptr<base::Value> value( 328 scoped_ptr<base::Value> value(
329 PolicyLoaderMac::CreateValueFromProperty(property)); 329 PolicyLoaderMac::CreateValueFromProperty(property));
330 ASSERT_TRUE(value.get()); 330 ASSERT_TRUE(value.get());
331 331
332 EXPECT_TRUE(root.Equals(value.get())); 332 EXPECT_TRUE(root.Equals(value.get()));
333 } 333 }
334 334
335 } // namespace policy 335 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_loader_mac.cc ('k') | chrome/browser/policy/preferences_mock_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698