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

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

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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 | Annotate | Revision Log
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 #include "chrome/browser/policy/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 <rpc.h> // For struct GUID 8 #include <rpc.h> // For struct GUID
9 #include <shlwapi.h> // For PathIsUNC() 9 #include <shlwapi.h> // For PathIsUNC()
10 #include <userenv.h> // For GPO functions 10 #include <userenv.h> // For GPO functions
11 11
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 // shlwapi.dll is required for PathIsUNC(). 15 // shlwapi.dll is required for PathIsUNC().
16 #pragma comment(lib, "shlwapi.lib") 16 #pragma comment(lib, "shlwapi.lib")
17 // userenv.dll is required for various GPO functions. 17 // userenv.dll is required for various GPO functions.
18 #pragma comment(lib, "userenv.lib") 18 #pragma comment(lib, "userenv.lib")
19 19
20 #include "base/basictypes.h" 20 #include "base/basictypes.h"
21 #include "base/file_util.h" 21 #include "base/file_util.h"
22 #include "base/json/json_reader.h" 22 #include "base/json/json_reader.h"
23 #include "base/lazy_instance.h" 23 #include "base/lazy_instance.h"
24 #include "base/logging.h" 24 #include "base/logging.h"
25 #include "base/scoped_native_library.h" 25 #include "base/scoped_native_library.h"
26 #include "base/sequenced_task_runner.h" 26 #include "base/sequenced_task_runner.h"
27 #include "base/stl_util.h" 27 #include "base/stl_util.h"
28 #include "base/strings/string16.h" 28 #include "base/strings/string16.h"
29 #include "base/strings/string_util.h" 29 #include "base/strings/string_util.h"
30 #include "chrome/browser/policy/policy_load_status.h"
31 #include "chrome/browser/policy/preg_parser_win.h"
32 #include "components/json_schema/json_schema_constants.h" 30 #include "components/json_schema/json_schema_constants.h"
33 #include "components/policy/core/common/policy_bundle.h" 31 #include "components/policy/core/common/policy_bundle.h"
32 #include "components/policy/core/common/policy_load_status.h"
34 #include "components/policy/core/common/policy_map.h" 33 #include "components/policy/core/common/policy_map.h"
35 #include "components/policy/core/common/policy_namespace.h" 34 #include "components/policy/core/common/policy_namespace.h"
35 #include "components/policy/core/common/preg_parser_win.h"
36 #include "components/policy/core/common/registry_dict_win.h" 36 #include "components/policy/core/common/registry_dict_win.h"
37 #include "components/policy/core/common/schema.h" 37 #include "components/policy/core/common/schema.h"
38 38
39 namespace schema = json_schema_constants; 39 namespace schema = json_schema_constants;
40 40
41 namespace policy { 41 namespace policy {
42 42
43 namespace { 43 namespace {
44 44
45 const char kKeyMandatory[] = "policy"; 45 const char kKeyMandatory[] = "policy";
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { 541 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) {
542 DCHECK(object == user_policy_changed_event_.handle() || 542 DCHECK(object == user_policy_changed_event_.handle() ||
543 object == machine_policy_changed_event_.handle()) 543 object == machine_policy_changed_event_.handle())
544 << "unexpected object signaled policy reload, obj = " 544 << "unexpected object signaled policy reload, obj = "
545 << std::showbase << std::hex << object; 545 << std::showbase << std::hex << object;
546 Reload(false); 546 Reload(false);
547 } 547 }
548 548
549 } // namespace policy 549 } // 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