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

Unified Diff: chrome/browser/policy/policy_path_parser.h

Issue 214233003: Refactorise the policy_path_parser framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes the review comments Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_path_parser.h
diff --git a/chrome/browser/policy/policy_path_parser.h b/chrome/browser/policy/policy_path_parser.h
index 5bf03452f7f98b9418f56ce6b183387d3cfb261c..c0d4c222ce858598269eafd34276ccf13b26ac68 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
« no previous file with comments | « no previous file | chrome/browser/policy/policy_path_parser.cc » ('j') | chrome/browser/policy/policy_path_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698