summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authordanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 13:24:32 +0000
committerdanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 13:24:32 +0000
commit98818cdcc329b8abf3a32d266cc984a0b06d0fe6 (patch)
tree13a59ecd0eb7bb71d4edb41f1133459fab9e6cf7 /chrome/app
parenta98ce12635e9c70626950f3bd9ae0e88ee5a357d (diff)
downloadchromium_src-98818cdcc329b8abf3a32d266cc984a0b06d0fe6.zip
chromium_src-98818cdcc329b8abf3a32d266cc984a0b06d0fe6.tar.gz
chromium_src-98818cdcc329b8abf3a32d266cc984a0b06d0fe6.tar.bz2
Reland 72784
This is the first step to being able to re-constitute policy from a non-generic protobuf in a policy request in a fully automated way (i.e. the code for the process can be generated). The non-generic protobuf is required for automatic merging of policy on the server-side. BUG=68309 TEST=existing policy/provider tests Review URL: http://codereview.chromium.org/6357021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/DEPS1
-rw-r--r--chrome/app/breakpad_mac.mm2
-rw-r--r--chrome/app/breakpad_win.cc2
-rw-r--r--chrome/app/policy/policy_templates.gypi90
-rw-r--r--chrome/app/policy/policy_templates.json13
5 files changed, 106 insertions, 2 deletions
diff --git a/chrome/app/DEPS b/chrome/app/DEPS
index d83f0a1..95afdc9 100644
--- a/chrome/app/DEPS
+++ b/chrome/app/DEPS
@@ -3,6 +3,7 @@ include_rules = [
"+chrome/browser",
"+chrome/installer",
"+grit", # For generated headers
+ "+policy", # For generated headers and source
"+sandbox",
"+tools/memory_watcher",
]
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index caa46cc..e7c40df 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -23,8 +23,8 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
-#include "chrome/common/policy_constants.h"
#include "chrome/installer/util/google_update_settings.h"
+#include "policy/policy_constants.h"
namespace {
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc
index 9fe1032..fc85b26 100644
--- a/chrome/app/breakpad_win.cc
+++ b/chrome/app/breakpad_win.cc
@@ -28,10 +28,10 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/result_codes.h"
-#include "chrome/common/policy_constants.h"
#include "chrome/installer/util/google_chrome_sxs_distribution.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/install_util.h"
+#include "policy/policy_constants.h"
namespace {
diff --git a/chrome/app/policy/policy_templates.gypi b/chrome/app/policy/policy_templates.gypi
index 4f41c3a..7233a93 100644
--- a/chrome/app/policy/policy_templates.gypi
+++ b/chrome/app/policy/policy_templates.gypi
@@ -3,7 +3,97 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
+ 'generate_policy_source_script':
+ ['python', 'tools/build/generate_policy_source.py'],
+ },
+ 'target_defaults': {
+ 'variables': {
+ 'policy_target': 0,
+ },
+ 'target_conditions': [
+ [ 'policy_target==1', {
+ 'include_dirs': [
+ '<(policy_out_dir)',
+ ],
+ 'actions': [
+ {
+ 'variables':
+ {
+ 'policy_constant_header':
+ '<(policy_out_dir)/policy/policy_constants.h',
+ 'policy_constant_source':
+ '<(policy_out_dir)/policy/policy_constants.cc',
+ 'configuration_policy_type_header':
+ '<(policy_out_dir)/policy/configuration_policy_type.h',
+ },
+ 'inputs': [
+ 'policy_templates.json',
+ '../../tools/build/generate_policy_source.py'
+ ],
+ 'outputs': [
+ '<(policy_constant_header)',
+ '<(policy_constant_source)',
+ '<(configuration_policy_type_header)',
+ ],
+ 'action_name': 'generate_policy_source',
+ 'action': [
+ '<@(generate_policy_source_script)',
+ '--policy-constants-header=<(policy_constant_header)',
+ '--policy-constants-source=<(policy_constant_source)',
+ '--policy-type-header=<(configuration_policy_type_header)',
+ '<(OS)',
+ '<@(_inputs)',
+ ],
+ 'message': 'Generating policy source',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ }, ],
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'policy',
+ 'type': '<(library)',
+ 'hard_dependency': 1,
+ 'include_dirs': [
+ '<(policy_out_dir)',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/policy'
+ ],
+ },
+ 'variables': {
+ 'policy_target': 1,
+ },
+ },
+ ],
'conditions': [
+ ['OS=="win"', {
+ 'targets': [
+ {
+ 'target_name': 'policy_win64',
+ 'type': '<(library)',
+ 'hard_dependency': 1,
+ 'variables': {
+ 'policy_target': 1,
+ },
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/policy'
+ ],
+ },
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_target_platform': 'x64',
+ },
+ },
+ },
+ ],
+ }],
['OS=="win" or OS=="mac" or OS=="linux"', {
'targets': [
{
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json
index 16b0a4a..c1165de 100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -728,6 +728,19 @@
</ph>.''',
},
{
+ 'name': 'BlockThirdPartyCookies',
+ 'type': 'main',
+ 'supported_on': ['chrome.*:10-'],
+ 'features': {'dynamic_refresh': 1},
+ 'example_value': False,
+ 'caption': '''Block third party cookies''',
+ 'desc': '''Blocks third party cookies.
+
+ Enabling this setting prevents cookies from being set by web page elements that are not from the domain that is in the browser's address bar.
+
+ Disabling this setting allows cookies to be set by web page elements that are not from the domain that is in the browser's address bar and prevents users from changing this setting.''',
+ },
+ {
'name': 'DefaultSearchProviderName',
'type': 'string',
'supported_on': ['chrome.*:8-'],