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

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

Issue 2860973002: Allow PolicyLoadStatusSample to override reporting method (Closed)
Patch Set: Cleanups and class rename. Created 3 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // This file provides a parser for PReg files which are used for storing group 5 // This file provides a parser for PReg files which are used for storing group
6 // policy settings in the file system. The file format is documented here: 6 // policy settings in the file system. The file format is documented here:
7 // 7 //
8 // http://msdn.microsoft.com/en-us/library/windows/desktop/aa374407(v=vs.85).asp x 8 // http://msdn.microsoft.com/en-us/library/windows/desktop/aa374407(v=vs.85).asp x
9 9
10 #ifndef COMPONENTS_POLICY_CORE_COMMON_PREG_PARSER_H_ 10 #ifndef COMPONENTS_POLICY_CORE_COMMON_PREG_PARSER_H_
(...skipping 19 matching lines...) Expand all
30 // The magic header in PReg files: ASCII "PReg" + version (0x0001). 30 // The magic header in PReg files: ASCII "PReg" + version (0x0001).
31 POLICY_EXPORT extern const char kPRegFileHeader[8]; 31 POLICY_EXPORT extern const char kPRegFileHeader[8];
32 32
33 // Reads the PReg file at |file_path| and writes the registry data to |dict|. 33 // Reads the PReg file at |file_path| and writes the registry data to |dict|.
34 // |root| specifies the registry subtree the caller is interested in, everything 34 // |root| specifies the registry subtree the caller is interested in, everything
35 // else gets ignored. It may be empty if all keys should be returned, but it 35 // else gets ignored. It may be empty if all keys should be returned, but it
36 // must NOT end with a backslash. 36 // must NOT end with a backslash.
37 POLICY_EXPORT bool ReadFile(const base::FilePath& file_path, 37 POLICY_EXPORT bool ReadFile(const base::FilePath& file_path,
38 const base::string16& root, 38 const base::string16& root,
39 RegistryDict* dict, 39 RegistryDict* dict,
40 PolicyLoadStatusSample* status_sample); 40 PolicyLoadStatusSampler* status);
41 41
42 // Similar to ReadFile, but reads from |preg_data| of length |preg_data_size| 42 // Similar to ReadFile, but reads from |preg_data| of length |preg_data_size|
43 // instead of a file, and writes status to the enum PolicyLoadStatus, which does 43 // instead of a file. |debug_name| is printed out along with error messages.
44 // not record UMA stats, unlike |PolicyLoadStatusSample|. |debug_name| is 44 // Used internally and for testing only. All other callers should use ReadFile
45 // printed out along with error messages. Used internally and for testing only. 45 // instead.
46 // All other callers should use ReadFile instead.
47 POLICY_EXPORT bool ReadDataInternal(const uint8_t* preg_data, 46 POLICY_EXPORT bool ReadDataInternal(const uint8_t* preg_data,
48 size_t preg_data_size, 47 size_t preg_data_size,
49 const base::string16& root, 48 const base::string16& root,
50 RegistryDict* dict, 49 RegistryDict* dict,
51 PolicyLoadStatus* status, 50 PolicyLoadStatusSampler* status,
52 const std::string& debug_name); 51 const std::string& debug_name);
53 52
54 } // namespace preg_parser 53 } // namespace preg_parser
55 } // namespace policy 54 } // namespace policy
56 55
57 #endif // COMPONENTS_POLICY_CORE_COMMON_PREG_PARSER_H_ 56 #endif // COMPONENTS_POLICY_CORE_COMMON_PREG_PARSER_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_loader_win.cc ('k') | components/policy/core/common/preg_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698