| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |