summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/policy_path_parser.h
diff options
context:
space:
mode:
authorkaliamoorthi@chromium.org <kaliamoorthi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 12:21:06 +0000
committerkaliamoorthi@chromium.org <kaliamoorthi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-03 12:21:06 +0000
commitf2dc9f306053f1fcbba99badf5edfab6a64b1392 (patch)
tree54ac015f36115071e2a3ee98c4e180582edad591 /chrome/browser/policy/policy_path_parser.h
parent06114b427935cb23724c12176be20d856d00ac58 (diff)
downloadchromium_src-f2dc9f306053f1fcbba99badf5edfab6a64b1392.zip
chromium_src-f2dc9f306053f1fcbba99badf5edfab6a64b1392.tar.gz
chromium_src-f2dc9f306053f1fcbba99badf5edfab6a64b1392.tar.bz2
Refactorise the policy_path_parser framework
This CL performs a refactorisation of the policy path parser framework. BUG=352627 Review URL: https://codereview.chromium.org/214233003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/policy_path_parser.h')
-rw-r--r--chrome/browser/policy/policy_path_parser.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/policy/policy_path_parser.h b/chrome/browser/policy/policy_path_parser.h
index 5bf0345..c0d4c22 100644
--- a/chrome/browser/policy/policy_path_parser.h
+++ b/chrome/browser/policy/policy_path_parser.h
@@ -7,12 +7,31 @@
#include <string>
+#include "base/bind.h"
#include "base/files/file_path.h"
namespace policy {
namespace path_parser {
+namespace internal {
+
+typedef bool (*GetValueFuncPtr)(base::FilePath::StringType*);
+
+struct VariableNameAndValueCallback {
+ const base::FilePath::CharType* name;
+ const GetValueFuncPtr value_func_ptr;
+};
+
+// Different set of variables are supported in each platform (see below). Hence
+// this table is filled in with different elements in each platform.
+extern const VariableNameAndValueCallback kVariableNameAndValueCallbacks[];
+
+// Since the number of elements in the table could vary for each platform, this
+// variable is used to keep track of it.
+extern const int kNoOfVariables;
+}
+
// This function is used to expand the variables in policy strings that
// represent paths. The set of supported variables differs between platforms
// but generally covers most standard locations that might be needed in the