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

Side by Side Diff: chrome/browser/policy/policy_path_parser.h

Issue 224023002: Revert of Refactorise the policy_path_parser framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/policy/policy_path_parser.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 CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_ 5 #ifndef CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_
6 #define CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_ 6 #define CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h"
11 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
12 11
13 namespace policy { 12 namespace policy {
14 13
15 namespace path_parser { 14 namespace path_parser {
16 15
17 namespace internal {
18
19 typedef bool (*GetValueFuncPtr)(base::FilePath::StringType*);
20
21 struct VariableNameAndValueCallback {
22 const base::FilePath::CharType* name;
23 const GetValueFuncPtr value_func_ptr;
24 };
25
26 // Different set of variables are supported in each platform (see below). Hence
27 // this table is filled in with different elements in each platform.
28 extern const VariableNameAndValueCallback kVariableNameAndValueCallbacks[];
29
30 // Since the number of elements in the table could vary for each platform, this
31 // variable is used to keep track of it.
32 extern const int kNoOfVariables;
33 }
34
35 // This function is used to expand the variables in policy strings that 16 // This function is used to expand the variables in policy strings that
36 // represent paths. The set of supported variables differs between platforms 17 // represent paths. The set of supported variables differs between platforms
37 // but generally covers most standard locations that might be needed in the 18 // but generally covers most standard locations that might be needed in the
38 // existing used cases. 19 // existing used cases.
39 // All platforms: 20 // All platforms:
40 // ${user_name} - The user that is running Chrome (respects suids). 21 // ${user_name} - The user that is running Chrome (respects suids).
41 // (example : "johndoe") 22 // (example : "johndoe")
42 // ${machine_name} - The machine name possibly with domain (example : 23 // ${machine_name} - The machine name possibly with domain (example :
43 // "johnny.cg1.cooldomain.org") 24 // "johnny.cg1.cooldomain.org")
44 // Windows only: 25 // Windows only:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // this function should be used to verify no policy is specified whenever the 58 // this function should be used to verify no policy is specified whenever the
78 // profile path is not read from the PathService which already takes this into 59 // profile path is not read from the PathService which already takes this into
79 // account. 60 // account.
80 void CheckUserDataDirPolicy(base::FilePath* user_data_dir); 61 void CheckUserDataDirPolicy(base::FilePath* user_data_dir);
81 62
82 } // namespace path_parser 63 } // namespace path_parser
83 64
84 } // namespace policy 65 } // namespace policy
85 66
86 #endif // CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_ 67 #endif // CHROME_BROWSER_POLICY_POLICY_PATH_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/policy_path_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698