diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 15:51:50 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 15:51:50 +0000 |
commit | 326cf715e5e1ea9d012782ae3b18458cf9cf26cc (patch) | |
tree | 4e1dc6c379acabb4608d58f6213433edee6467e9 /chrome/browser/policy/configuration_policy_loader_win.h | |
parent | 0f6e6627eb5fa4fdf7a1764be83e4372f24ca105 (diff) | |
download | chromium_src-326cf715e5e1ea9d012782ae3b18458cf9cf26cc.zip chromium_src-326cf715e5e1ea9d012782ae3b18458cf9cf26cc.tar.gz chromium_src-326cf715e5e1ea9d012782ae3b18458cf9cf26cc.tar.bz2 |
Implement the windows policy provider based on the AsyncPolicyLoader.
BUG=130918
TEST=windows policy still works, unit_tests green
Review URL: https://chromiumcodereview.appspot.com/10491013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/configuration_policy_loader_win.h')
-rw-r--r-- | chrome/browser/policy/configuration_policy_loader_win.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/chrome/browser/policy/configuration_policy_loader_win.h b/chrome/browser/policy/configuration_policy_loader_win.h deleted file mode 100644 index d0317a9..0000000 --- a/chrome/browser/policy/configuration_policy_loader_win.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_LOADER_WIN_H_ -#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_LOADER_WIN_H_ -#pragma once - -#include "base/synchronization/waitable_event.h" -#include "base/win/object_watcher.h" -#include "chrome/browser/policy/asynchronous_policy_loader.h" - -namespace policy { - -// Keeps watch on Windows Group Policy notification event to trigger a policy -// reload when Group Policy changes. -class ConfigurationPolicyLoaderWin - : public AsynchronousPolicyLoader, - public base::win::ObjectWatcher::Delegate { - public: - ConfigurationPolicyLoaderWin( - AsynchronousPolicyProvider::Delegate* delegate, - int reload_interval_minutes); - virtual ~ConfigurationPolicyLoaderWin() {} - - // AsynchronousPolicyLoader overrides: - virtual void Reload(bool force) OVERRIDE; - - protected: - // AsynchronousPolicyLoader overrides: - virtual void InitOnFileThread() OVERRIDE; - virtual void StopOnFileThread() OVERRIDE; - - private: - // Updates the watchers and schedules the reload task if appropriate. - void SetupWatches(); - - // ObjectWatcher::Delegate overrides: - virtual void OnObjectSignaled(HANDLE object) OVERRIDE; - - base::WaitableEvent user_policy_changed_event_; - base::WaitableEvent machine_policy_changed_event_; - base::win::ObjectWatcher user_policy_watcher_; - base::win::ObjectWatcher machine_policy_watcher_; - bool user_policy_watcher_failed_; - bool machine_policy_watcher_failed_; - - DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyLoaderWin); -}; - -} // namespace policy - -#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_LOADER_WIN_H_ |