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

Side by Side Diff: remoting/host/policy_hack/policy_watcher_mac.mm

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 (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 "remoting/host/policy_hack/policy_watcher.h" 5 #include "remoting/host/policy_hack/policy_watcher.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 policy_bundle_id, 53 policy_bundle_id,
54 &valid); 54 &valid);
55 if (valid) { 55 if (valid) {
56 policy.SetBoolean(policy_name, value); 56 policy.SetBoolean(policy_name, value);
57 } 57 }
58 } 58 }
59 59
60 if (i.value().GetType() == base::DictionaryValue::TYPE_STRING) { 60 if (i.value().GetType() == base::DictionaryValue::TYPE_STRING) {
61 base::ScopedCFTypeRef<CFPropertyListRef> property_list( 61 base::ScopedCFTypeRef<CFPropertyListRef> property_list(
62 CFPreferencesCopyAppValue(policy_key, policy_bundle_id)); 62 CFPreferencesCopyAppValue(policy_key, policy_bundle_id));
63 if (property_list.get() != NULL) { 63 if (property_list.get() != nullptr) {
64 CFStringRef policy_value = base::mac::CFCast<CFStringRef>( 64 CFStringRef policy_value = base::mac::CFCast<CFStringRef>(
65 property_list.get()); 65 property_list.get());
66 if (policy_value != NULL) { 66 if (policy_value != nullptr) {
67 policy.SetString(policy_name, 67 policy.SetString(policy_name,
68 base::SysCFStringRefToUTF8(policy_value)); 68 base::SysCFStringRefToUTF8(policy_value));
69 } 69 }
70 } 70 }
71 } 71 }
72 72
73 } 73 }
74 } 74 }
75 75
76 // Set policy. Policy must be set (even if it is empty) so that the 76 // Set policy. Policy must be set (even if it is empty) so that the
77 // default policy is picked up the first time reload is called. 77 // default policy is picked up the first time reload is called.
78 UpdatePolicies(&policy); 78 UpdatePolicies(&policy);
79 79
80 // Reschedule task. 80 // Reschedule task.
81 ScheduleFallbackReloadTask(); 81 ScheduleFallbackReloadTask();
82 } 82 }
83 }; 83 };
84 84
85 scoped_ptr<PolicyWatcher> PolicyWatcher::Create( 85 scoped_ptr<PolicyWatcher> PolicyWatcher::Create(
86 policy::PolicyService* policy_service, 86 policy::PolicyService* policy_service,
87 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 87 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
88 return make_scoped_ptr(new PolicyWatcherMac(task_runner)); 88 return make_scoped_ptr(new PolicyWatcherMac(task_runner));
89 } 89 }
90 90
91 } // namespace policy_hack 91 } // namespace policy_hack
92 } // namespace remoting 92 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_linux.cc ('k') | remoting/host/posix/signal_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698