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

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

Issue 10873050: [Chromoting] Hook up host talkgadget policy checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra LOGs Created 8 years, 3 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 // Most of this code is copied from: 5 // Most of this code is copied from:
6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc} 6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc}
7 7
8 #include "remoting/host/policy_hack/policy_watcher.h" 8 #include "remoting/host/policy_hack/policy_watcher.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 scoped_ptr<base::DictionaryValue> to(new base::DictionaryValue()); 89 scoped_ptr<base::DictionaryValue> to(new base::DictionaryValue());
90 CopyBooleanOrDefault(to.get(), from, 90 CopyBooleanOrDefault(to.get(), from,
91 PolicyWatcher::kNatPolicyName, true, false); 91 PolicyWatcher::kNatPolicyName, true, false);
92 CopyBooleanOrDefault(to.get(), from, 92 CopyBooleanOrDefault(to.get(), from,
93 PolicyWatcher::kHostRequireTwoFactorPolicyName, 93 PolicyWatcher::kHostRequireTwoFactorPolicyName,
94 false, false); 94 false, false);
95 CopyStringOrDefault(to.get(), from, 95 CopyStringOrDefault(to.get(), from,
96 PolicyWatcher::kHostDomainPolicyName, "", ""); 96 PolicyWatcher::kHostDomainPolicyName, "", "");
97 CopyStringOrDefault(to.get(), from, 97 CopyStringOrDefault(to.get(), from,
98 PolicyWatcher::kHostTalkGadgetPrefixPolicyName, 98 PolicyWatcher::kHostTalkGadgetPrefixPolicyName,
99 kDefaultTalkGadgetPrefix, kDefaultTalkGadgetPrefix); 99 kDefaultHostTalkGadgetPrefix,
100 kDefaultHostTalkGadgetPrefix);
100 CopyBooleanOrDefault(to.get(), from, 101 CopyBooleanOrDefault(to.get(), from,
101 PolicyWatcher::kHostRequireCurtainPolicyName, 102 PolicyWatcher::kHostRequireCurtainPolicyName,
102 false, false); 103 false, false);
103 104
104 return to.Pass(); 105 return to.Pass();
105 } 106 }
106 107
107 } // namespace 108 } // namespace
108 109
109 const char PolicyWatcher::kNatPolicyName[] = 110 const char PolicyWatcher::kNatPolicyName[] =
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 old_policies_.swap(new_policies); 220 old_policies_.swap(new_policies);
220 221
221 // Notify our client of the changed policies. 222 // Notify our client of the changed policies.
222 if (!changed_policies->empty()) { 223 if (!changed_policies->empty()) {
223 policy_callback_.Run(changed_policies.Pass()); 224 policy_callback_.Run(changed_policies.Pass());
224 } 225 }
225 } 226 }
226 227
227 } // namespace policy_hack 228 } // namespace policy_hack
228 } // namespace remoting 229 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698