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

Side by Side Diff: components/policy/core/common/policy_loader_win.h

Issue 947353002: Chromoting needs null GPO provider in PolicyLoaderWin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | components/policy/core/common/policy_loader_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <userenv.h> 9 #include <userenv.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Loads policies from the Windows registry, and watches for Group Policy 45 // Loads policies from the Windows registry, and watches for Group Policy
46 // notifications to trigger reloads. 46 // notifications to trigger reloads.
47 class POLICY_EXPORT PolicyLoaderWin 47 class POLICY_EXPORT PolicyLoaderWin
48 : public AsyncPolicyLoader, 48 : public AsyncPolicyLoader,
49 public base::win::ObjectWatcher::Delegate { 49 public base::win::ObjectWatcher::Delegate {
50 public: 50 public:
51 // The PReg file name used by GPO. 51 // The PReg file name used by GPO.
52 static const base::FilePath::CharType kPRegFileName[]; 52 static const base::FilePath::CharType kPRegFileName[];
53 53
54 // Passing |gpo_provider| equal nullptr forces all reads to go through the
55 // registry. This is undesirable for Chrome (see crbug.com/259236), but
56 // needed for some other use cases (i.e. Chromoting - see crbug.com/460734).
54 PolicyLoaderWin(scoped_refptr<base::SequencedTaskRunner> task_runner, 57 PolicyLoaderWin(scoped_refptr<base::SequencedTaskRunner> task_runner,
55 const base::string16& chrome_policy_key, 58 const base::string16& chrome_policy_key,
56 AppliedGPOListProvider* gpo_provider); 59 AppliedGPOListProvider* gpo_provider);
57 virtual ~PolicyLoaderWin(); 60 virtual ~PolicyLoaderWin();
58 61
59 // Creates a policy loader that uses the Win API to access GPO. 62 // Creates a policy loader that uses the Win API to access GPO.
60 static scoped_ptr<PolicyLoaderWin> Create( 63 static scoped_ptr<PolicyLoaderWin> Create(
61 scoped_refptr<base::SequencedTaskRunner> task_runner, 64 scoped_refptr<base::SequencedTaskRunner> task_runner,
62 const base::string16& chrome_policy_key); 65 const base::string16& chrome_policy_key);
63 66
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 base::win::ObjectWatcher machine_policy_watcher_; 119 base::win::ObjectWatcher machine_policy_watcher_;
117 bool user_policy_watcher_failed_; 120 bool user_policy_watcher_failed_;
118 bool machine_policy_watcher_failed_; 121 bool machine_policy_watcher_failed_;
119 122
120 DISALLOW_COPY_AND_ASSIGN(PolicyLoaderWin); 123 DISALLOW_COPY_AND_ASSIGN(PolicyLoaderWin);
121 }; 124 };
122 125
123 } // namespace policy 126 } // namespace policy
124 127
125 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_ 128 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/policy_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698