summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-09 14:29:41 +0000
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-09 14:29:41 +0000
commitaecb608bc590bb7708b9ad62e59e310cd237fd53 (patch)
tree83c28867763a1f2594d91f3899eea823b99d32fe /chrome/tools
parent29fa265e48393bc063bc046964da351d61dcb9a9 (diff)
downloadchromium_src-aecb608bc590bb7708b9ad62e59e310cd237fd53.zip
chromium_src-aecb608bc590bb7708b9ad62e59e310cd237fd53.tar.gz
chromium_src-aecb608bc590bb7708b9ad62e59e310cd237fd53.tar.bz2
Allow PolicyMapEntry to reference external data
This CL is the first step in adding support for a new policy type that references an external data blob. The CL extends the PolicyMapEntry class with an external_data_fetcher member that will be used to retrieve the data. BUG=256635 TEST=Extended unit tests TBR=jochen@chromium.org (adding NULL arg to PolicyMap::Set() throughout chrome/) Review URL: https://chromiumcodereview.appspot.com/18259006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-xchrome/tools/build/generate_policy_source.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py
index d387b82..fb307d1 100755
--- a/chrome/tools/build/generate_policy_source.py
+++ b/chrome/tools/build/generate_policy_source.py
@@ -412,8 +412,10 @@ CPP_HEAD = '''
#include <limits>
#include <string>
+#include "base/callback.h"
#include "base/logging.h"
#include "base/values.h"
+#include "chrome/browser/policy/external_data_fetcher.h"
#include "chrome/browser/policy/policy_map.h"
#include "policy/policy_constants.h"
#include "policy/proto/cloud_policy.pb.h"
@@ -498,8 +500,9 @@ def _WritePolicyCode(f, policy):
' if (do_set) {\n')
f.write(' base::Value* value = %s;\n' %
(_CreateValue(policy.value_type, 'policy_proto.value()')))
- f.write(' map->Set(key::k%s, level, POLICY_SCOPE_USER, value);\n' %
+ f.write(' map->Set(key::k%s, level, POLICY_SCOPE_USER,\n' %
policy.name)
+ f.write(' value, NULL);\n')
f.write(' }\n'
' }\n'
' }\n')