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

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

Issue 1056633004: Update {virtual,override} to follow C++11 style in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix logo tracker unittest. Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "components/policy/core/common/policy_loader_win.h" 5 #include "components/policy/core/common/policy_loader_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <lm.h> // For limits. 8 #include <lm.h> // For limits.
9 #include <ntdsapi.h> // For Ds[Un]Bind 9 #include <ntdsapi.h> // For Ds[Un]Bind
10 #include <rpc.h> // For struct GUID 10 #include <rpc.h> // For struct GUID
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 private: 278 private:
279 bool active_; 279 bool active_;
280 PVOID previous_state_; 280 PVOID previous_state_;
281 281
282 DISALLOW_COPY_AND_ASSIGN(ScopedDisableWow64Redirection); 282 DISALLOW_COPY_AND_ASSIGN(ScopedDisableWow64Redirection);
283 }; 283 };
284 284
285 // AppliedGPOListProvider implementation that calls actual Windows APIs. 285 // AppliedGPOListProvider implementation that calls actual Windows APIs.
286 class WinGPOListProvider : public AppliedGPOListProvider { 286 class WinGPOListProvider : public AppliedGPOListProvider {
287 public: 287 public:
288 virtual ~WinGPOListProvider() {} 288 ~WinGPOListProvider() override {}
289 289
290 // AppliedGPOListProvider: 290 // AppliedGPOListProvider:
291 virtual DWORD GetAppliedGPOList(DWORD flags, 291 DWORD GetAppliedGPOList(DWORD flags,
292 LPCTSTR machine_name, 292 LPCTSTR machine_name,
293 PSID sid_user, 293 PSID sid_user,
294 GUID* extension_guid, 294 GUID* extension_guid,
295 PGROUP_POLICY_OBJECT* gpo_list) override { 295 PGROUP_POLICY_OBJECT* gpo_list) override {
296 return ::GetAppliedGPOList(flags, machine_name, sid_user, extension_guid, 296 return ::GetAppliedGPOList(flags, machine_name, sid_user, extension_guid,
297 gpo_list); 297 gpo_list);
298 } 298 }
299 299
300 virtual BOOL FreeGPOList(PGROUP_POLICY_OBJECT gpo_list) override { 300 BOOL FreeGPOList(PGROUP_POLICY_OBJECT gpo_list) override {
301 return ::FreeGPOList(gpo_list); 301 return ::FreeGPOList(gpo_list);
302 } 302 }
303 }; 303 };
304 304
305 // The default windows GPO list provider used for PolicyLoaderWin. 305 // The default windows GPO list provider used for PolicyLoaderWin.
306 static base::LazyInstance<WinGPOListProvider> g_win_gpo_list_provider = 306 static base::LazyInstance<WinGPOListProvider> g_win_gpo_list_provider =
307 LAZY_INSTANCE_INITIALIZER; 307 LAZY_INSTANCE_INITIALIZER;
308 308
309 // Parses |gpo_dict| according to |schema| and writes the resulting policy 309 // Parses |gpo_dict| according to |schema| and writes the resulting policy
310 // settings to |policy| for the given |scope| and |level|. 310 // settings to |policy| for the given |scope| and |level|.
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { 684 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) {
685 DCHECK(object == user_policy_changed_event_.handle() || 685 DCHECK(object == user_policy_changed_event_.handle() ||
686 object == machine_policy_changed_event_.handle()) 686 object == machine_policy_changed_event_.handle())
687 << "unexpected object signaled policy reload, obj = " 687 << "unexpected object signaled policy reload, obj = "
688 << std::showbase << std::hex << object; 688 << std::showbase << std::hex << object;
689 Reload(false); 689 Reload(false);
690 } 690 }
691 691
692 } // namespace policy 692 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_loader_win.h ('k') | components/policy/core/common/policy_loader_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698