| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/configuration_policy_provider_win.h" | 5 #include "chrome/browser/configuration_policy_provider_win.h" |
| 6 | 6 |
| 7 #include <userenv.h> | 7 #include <userenv.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/object_watcher.h" | 12 #include "base/object_watcher.h" |
| 13 #include "base/registry.h" | 13 #include "base/registry.h" |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 #include "base/string_piece.h" | 15 #include "base/string_piece.h" |
| 16 #include "base/sys_string_conversions.h" | 16 #include "base/sys_string_conversions.h" |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "base/waitable_event.h" | |
| 20 #include "chrome/common/policy_constants.h" | 19 #include "chrome/common/policy_constants.h" |
| 21 | 20 |
| 22 ConfigurationPolicyProviderWin::GroupPolicyChangeWatcher:: | 21 ConfigurationPolicyProviderWin::GroupPolicyChangeWatcher:: |
| 23 GroupPolicyChangeWatcher(ConfigurationPolicyProvider* provider) | 22 GroupPolicyChangeWatcher(ConfigurationPolicyProvider* provider) |
| 24 : provider_(provider), | 23 : provider_(provider), |
| 25 user_policy_changed_event_(false, false), | 24 user_policy_changed_event_(false, false), |
| 26 machine_policy_changed_event_(false, false) { | 25 machine_policy_changed_event_(false, false) { |
| 27 CHECK(RegisterGPNotification(user_policy_changed_event_.handle(), false)); | 26 CHECK(RegisterGPNotification(user_policy_changed_event_.handle(), false)); |
| 28 CHECK(RegisterGPNotification(machine_policy_changed_event_.handle(), true)); | 27 CHECK(RegisterGPNotification(machine_policy_changed_event_.handle(), true)); |
| 29 user_policy_watcher_.StartWatching( | 28 user_policy_watcher_.StartWatching( |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 157 } |
| 159 break; | 158 break; |
| 160 default: | 159 default: |
| 161 NOTREACHED(); | 160 NOTREACHED(); |
| 162 return false; | 161 return false; |
| 163 } | 162 } |
| 164 } | 163 } |
| 165 | 164 |
| 166 return true; | 165 return true; |
| 167 } | 166 } |
| OLD | NEW |