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

Side by Side Diff: remoting/host/it2me/it2me_host.cc

Issue 820133002: Reusing names of policy keys from policy_constants.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/it2me/it2me_host.h" 5 #include "remoting/host/it2me/it2me_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "net/socket/client_socket_factory.h" 10 #include "net/socket/client_socket_factory.h"
11 #include "policy/policy_constants.h"
11 #include "remoting/base/auto_thread.h" 12 #include "remoting/base/auto_thread.h"
12 #include "remoting/base/logging.h" 13 #include "remoting/base/logging.h"
13 #include "remoting/base/rsa_key_pair.h" 14 #include "remoting/base/rsa_key_pair.h"
14 #include "remoting/host/chromoting_host.h" 15 #include "remoting/host/chromoting_host.h"
15 #include "remoting/host/chromoting_host_context.h" 16 #include "remoting/host/chromoting_host_context.h"
16 #include "remoting/host/host_event_logger.h" 17 #include "remoting/host/host_event_logger.h"
17 #include "remoting/host/host_secret.h" 18 #include "remoting/host/host_secret.h"
18 #include "remoting/host/host_status_logger.h" 19 #include "remoting/host/host_status_logger.h"
19 #include "remoting/host/it2me_desktop_environment.h" 20 #include "remoting/host/it2me_desktop_environment.h"
20 #include "remoting/host/policy_hack/policy_watcher.h" 21 #include "remoting/host/policy_hack/policy_watcher.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // The policy watcher runs on the |ui_task_runner| on ChromeOS and the 317 // The policy watcher runs on the |ui_task_runner| on ChromeOS and the
317 // |network_task_runner| on other platforms. 318 // |network_task_runner| on other platforms.
318 if (!host_context_->network_task_runner()->BelongsToCurrentThread()) { 319 if (!host_context_->network_task_runner()->BelongsToCurrentThread()) {
319 host_context_->network_task_runner()->PostTask( 320 host_context_->network_task_runner()->PostTask(
320 FROM_HERE, 321 FROM_HERE,
321 base::Bind(&It2MeHost::OnPolicyUpdate, this, base::Passed(&policies))); 322 base::Bind(&It2MeHost::OnPolicyUpdate, this, base::Passed(&policies)));
322 return; 323 return;
323 } 324 }
324 325
325 bool nat_policy; 326 bool nat_policy;
326 if (policies->GetBoolean(policy_hack::PolicyWatcher::kNatPolicyName, 327 if (policies->GetBoolean(policy::key::kRemoteAccessHostFirewallTraversal,
327 &nat_policy)) { 328 &nat_policy)) {
328 UpdateNatPolicy(nat_policy); 329 UpdateNatPolicy(nat_policy);
329 } 330 }
330 std::string host_domain; 331 std::string host_domain;
331 if (policies->GetString(policy_hack::PolicyWatcher::kHostDomainPolicyName, 332 if (policies->GetString(policy::key::kRemoteAccessHostDomain, &host_domain)) {
332 &host_domain)) {
333 UpdateHostDomainPolicy(host_domain); 333 UpdateHostDomainPolicy(host_domain);
334 } 334 }
335 335
336 policy_received_ = true; 336 policy_received_ = true;
337 337
338 if (!pending_connect_.is_null()) { 338 if (!pending_connect_.is_null()) {
339 pending_connect_.Run(); 339 pending_connect_.Run();
340 pending_connect_.Reset(); 340 pending_connect_.Reset();
341 } 341 }
342 } 342 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, 491 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config,
492 const std::string& directory_bot_jid) { 492 const std::string& directory_bot_jid) {
493 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher = 493 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher =
494 policy_hack::PolicyWatcher::Create(policy_service_, 494 policy_hack::PolicyWatcher::Create(policy_service_,
495 context->network_task_runner()); 495 context->network_task_runner());
496 return new It2MeHost(context.Pass(), policy_watcher.Pass(), observer, 496 return new It2MeHost(context.Pass(), policy_watcher.Pass(), observer,
497 xmpp_server_config, directory_bot_jid); 497 xmpp_server_config, directory_bot_jid);
498 } 498 }
499 499
500 } // namespace remoting 500 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698