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

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

Issue 14522010: remoting: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 "RemoteAccessHostTokenValidationUrl"; 99 "RemoteAccessHostTokenValidationUrl";
100 100
101 const char PolicyWatcher::kHostDebugOverridePoliciesName[] = 101 const char PolicyWatcher::kHostDebugOverridePoliciesName[] =
102 "RemoteAccessHostDebugOverridePolicies"; 102 "RemoteAccessHostDebugOverridePolicies";
103 103
104 PolicyWatcher::PolicyWatcher( 104 PolicyWatcher::PolicyWatcher(
105 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 105 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
106 : task_runner_(task_runner), 106 : task_runner_(task_runner),
107 old_policies_(new base::DictionaryValue()), 107 old_policies_(new base::DictionaryValue()),
108 default_values_(new base::DictionaryValue()), 108 default_values_(new base::DictionaryValue()),
109 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 109 weak_factory_(this) {
110 // Initialize the default values for each policy. 110 // Initialize the default values for each policy.
111 default_values_->SetBoolean(kNatPolicyName, true); 111 default_values_->SetBoolean(kNatPolicyName, true);
112 default_values_->SetBoolean(kHostRequireTwoFactorPolicyName, false); 112 default_values_->SetBoolean(kHostRequireTwoFactorPolicyName, false);
113 default_values_->SetBoolean(kHostRequireCurtainPolicyName, false); 113 default_values_->SetBoolean(kHostRequireCurtainPolicyName, false);
114 default_values_->SetBoolean(kHostMatchUsernamePolicyName, false); 114 default_values_->SetBoolean(kHostMatchUsernamePolicyName, false);
115 default_values_->SetString(kHostDomainPolicyName, std::string()); 115 default_values_->SetString(kHostDomainPolicyName, std::string());
116 default_values_->SetString(kHostTalkGadgetPrefixPolicyName, 116 default_values_->SetString(kHostTalkGadgetPrefixPolicyName,
117 kDefaultHostTalkGadgetPrefix); 117 kDefaultHostTalkGadgetPrefix);
118 default_values_->SetString(kHostTokenUrlPolicyName, std::string()); 118 default_values_->SetString(kHostTokenUrlPolicyName, std::string());
119 default_values_->SetString(kHostTokenValidationUrlPolicyName, std::string()); 119 default_values_->SetString(kHostTokenValidationUrlPolicyName, std::string());
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 old_policies_.swap(new_policies); 206 old_policies_.swap(new_policies);
207 207
208 // Notify our client of the changed policies. 208 // Notify our client of the changed policies.
209 if (!changed_policies->empty()) { 209 if (!changed_policies->empty()) {
210 policy_callback_.Run(changed_policies.Pass()); 210 policy_callback_.Run(changed_policies.Pass());
211 } 211 }
212 } 212 }
213 213
214 } // namespace policy_hack 214 } // namespace policy_hack
215 } // namespace remoting 215 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698