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

Side by Side Diff: remoting/host/policy_hack/policy_watcher_win.cc

Issue 10816036: [Chromoting] Add a host domain policy to the PolicyWatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to match r148833. Created 8 years, 4 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
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Most of this code is copied from various classes in 5 // Most of this code is copied from various classes in
6 // src/chrome/browser/policy. In particular, look at 6 // src/chrome/browser/policy. In particular, look at
7 // 7 //
8 // configuration_policy_provider_delegate_win.{h,cc} 8 // configuration_policy_provider_delegate_win.{h,cc}
9 // configuration_policy_loader_win.{h,cc} 9 // configuration_policy_loader_win.{h,cc}
10 // 10 //
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 base::DictionaryValue* policy = new base::DictionaryValue(); 144 base::DictionaryValue* policy = new base::DictionaryValue();
145 145
146 for (int i = 0; i < kBooleanPolicyNamesNum; ++i) { 146 for (int i = 0; i < kBooleanPolicyNamesNum; ++i) {
147 const char* policy_name = kBooleanPolicyNames[i]; 147 const char* policy_name = kBooleanPolicyNames[i];
148 bool bool_value; 148 bool bool_value;
149 const string16 name(ASCIIToUTF16(policy_name)); 149 const string16 name(ASCIIToUTF16(policy_name));
150 if (GetRegistryPolicyBoolean(name, &bool_value)) { 150 if (GetRegistryPolicyBoolean(name, &bool_value)) {
151 policy->SetBoolean(policy_name, bool_value); 151 policy->SetBoolean(policy_name, bool_value);
152 } 152 }
153 } 153 }
154 // TODO(simonmorris): Read policies whose names are in kStringPolicyNames.
154 155
155 return policy; 156 return policy;
156 } 157 }
157 158
158 // Post a reload notification and update the watch machinery. 159 // Post a reload notification and update the watch machinery.
159 void Reload() { 160 void Reload() {
160 DCHECK(OnPolicyWatcherThread()); 161 DCHECK(OnPolicyWatcherThread());
161 SetupWatches(); 162 SetupWatches();
162 scoped_ptr<DictionaryValue> new_policy(Load()); 163 scoped_ptr<DictionaryValue> new_policy(Load());
163 UpdatePolicies(new_policy.get()); 164 UpdatePolicies(new_policy.get());
(...skipping 17 matching lines...) Expand all
181 bool machine_policy_watcher_failed_; 182 bool machine_policy_watcher_failed_;
182 }; 183 };
183 184
184 PolicyWatcher* PolicyWatcher::Create( 185 PolicyWatcher* PolicyWatcher::Create(
185 scoped_refptr<base::SingleThreadTaskRunner> task_runner) { 186 scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
186 return new PolicyWatcherWin(task_runner); 187 return new PolicyWatcherWin(task_runner);
187 } 188 }
188 189
189 } // namespace policy_hack 190 } // namespace policy_hack
190 } // namespace remoting 191 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/policy_hack/policy_watcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698