| OLD | NEW |
| 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" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/time.h" | 16 #include "base/time/time.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "remoting/host/dns_blackhole_checker.h" | 18 #include "remoting/host/dns_blackhole_checker.h" |
| 19 | 19 |
| 20 #if !defined(NDEBUG) | 20 #if !defined(NDEBUG) |
| 21 #include "base/json/json_reader.h" | 21 #include "base/json/json_reader.h" |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 namespace remoting { | 24 namespace remoting { |
| 25 namespace policy_hack { | 25 namespace policy_hack { |
| 26 | 26 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |