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

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy.cc

Issue 7888022: Add DISABLE_TCP_TRANSPORT flag in the Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/plugin/policy_hack/nat_policy.h" 8 #include "remoting/host/plugin/policy_hack/nat_policy.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (new_policy->Get(kNatPolicyName, &value) && 98 if (new_policy->Get(kNatPolicyName, &value) &&
99 value->IsType(base::Value::TYPE_BOOLEAN)) { 99 value->IsType(base::Value::TYPE_BOOLEAN)) {
100 CHECK(value->GetAsBoolean(&new_nat_enabled_state)); 100 CHECK(value->GetAsBoolean(&new_nat_enabled_state));
101 } 101 }
102 } 102 }
103 103
104 if (!first_state_published_ || 104 if (!first_state_published_ ||
105 (new_nat_enabled_state != current_nat_enabled_state_)) { 105 (new_nat_enabled_state != current_nat_enabled_state_)) {
106 first_state_published_ = true; 106 first_state_published_ = true;
107 current_nat_enabled_state_ = new_nat_enabled_state; 107 current_nat_enabled_state_ = new_nat_enabled_state;
108 LOG(ERROR) << "Calling callback";
108 nat_enabled_cb_.Run(current_nat_enabled_state_); 109 nat_enabled_cb_.Run(current_nat_enabled_state_);
109 } 110 }
110 } 111 }
111 112
112 } // namespace policy_hack 113 } // namespace policy_hack
113 } // namespace remoting 114 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698