summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/configuration_policy_store_interface.h
diff options
context:
space:
mode:
authordanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 10:24:11 +0000
committerdanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 10:24:11 +0000
commit12a3c0247e14ff824027318e477693e8db1bbfd9 (patch)
tree50c0f8070bdc7b4046540bbad45389a614f7ee9d /chrome/browser/policy/configuration_policy_store_interface.h
parenta614c8154fa773c2b55ab36df9f67c67dc09c087 (diff)
downloadchromium_src-12a3c0247e14ff824027318e477693e8db1bbfd9.zip
chromium_src-12a3c0247e14ff824027318e477693e8db1bbfd9.tar.gz
chromium_src-12a3c0247e14ff824027318e477693e8db1bbfd9.tar.bz2
C++ readability review for danno
I wrote much of the cross-platform policy-providing mechanism for Chrome. Much of the policy code is cross platform, so I would like to apply for a Linux C++ readability review. However, my submitted CLs also contain Windows-specific code, so I'm unsure if Windows readability is more appropriate. * Implementation of managed policy abstraction on top of a preference store. This is the CL that is the initial preparation for implementing platform-specific policy - http://codereview.chromium.org/1692011 * Implement core mechanism to honor Windows Group Policy on top of initial CL - http://codereview.chromium.org/2119005 * Dynamic refresh of policy without restarting Chrome including Windows-specific code - http://codereview.chromium.org/2858060 BUG=none TEST=none Review URL: http://codereview.chromium.org/3774003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/configuration_policy_store_interface.h')
-rw-r--r--chrome/browser/policy/configuration_policy_store_interface.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/chrome/browser/policy/configuration_policy_store_interface.h b/chrome/browser/policy/configuration_policy_store_interface.h
new file mode 100644
index 0000000..7bdcf74
--- /dev/null
+++ b/chrome/browser/policy/configuration_policy_store_interface.h
@@ -0,0 +1,83 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_
+#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_
+#pragma once
+
+#include "base/basictypes.h"
+
+class Value;
+
+namespace policy {
+
+enum ConfigurationPolicyType {
+ kPolicyHomePage,
+ kPolicyHomepageIsNewTabPage,
+ kPolicyRestoreOnStartup,
+ kPolicyURLsToRestoreOnStartup,
+ kPolicyDefaultSearchProviderEnabled,
+ kPolicyDefaultSearchProviderName,
+ kPolicyDefaultSearchProviderKeyword,
+ kPolicyDefaultSearchProviderSearchURL,
+ kPolicyDefaultSearchProviderSuggestURL,
+ kPolicyDefaultSearchProviderIconURL,
+ kPolicyDefaultSearchProviderEncodings,
+ kPolicyDisableSpdy,
+ kPolicyProxyServerMode,
+ kPolicyProxyServer,
+ kPolicyProxyPacUrl,
+ kPolicyProxyBypassList,
+ kPolicyAlternateErrorPagesEnabled,
+ kPolicySearchSuggestEnabled,
+ kPolicyDnsPrefetchingEnabled,
+ kPolicySafeBrowsingEnabled,
+ kPolicyMetricsReportingEnabled,
+ kPolicyPasswordManagerEnabled,
+ kPolicyPasswordManagerAllowShowPasswords,
+ kPolicyAutoFillEnabled,
+ kPolicySyncDisabled,
+ kPolicyApplicationLocale,
+ kPolicyExtensionInstallAllowList,
+ kPolicyExtensionInstallDenyList,
+ kPolicyShowHomeButton,
+ kPolicyDisabledPlugins,
+ kPolicyPrintingEnabled,
+ kPolicyChromeFrameRendererSettings,
+ kPolicyRenderInChromeFrameList,
+ kPolicyRenderInHostList,
+ kPolicyJavascriptEnabled,
+ kPolicySavingBrowserHistoryDisabled,
+ kPolicyDeveloperToolsDisabled,
+ kPolicyBlockThirdPartyCookies,
+ kPolicyExtensionInstallForceList,
+ kPolicyChromeOsLockOnIdleSuspend,
+};
+
+static const int kPolicyNoProxyServerMode = 0;
+static const int kPolicyAutoDetectProxyMode = 1;
+static const int kPolicyManuallyConfiguredProxyMode = 2;
+static const int kPolicyUseSystemProxyMode = 3;
+
+// An abstract super class for policy stores that provides a method that can be
+// called by a |ConfigurationPolicyProvider| to specify a policy.
+class ConfigurationPolicyStoreInterface {
+ public:
+ virtual ~ConfigurationPolicyStoreInterface() {}
+
+ // A |ConfigurationPolicyProvider| specifies the value of a policy
+ // setting through a call to |Apply|. The configuration policy pref
+ // store takes over the ownership of |value|.
+ virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0;
+
+ protected:
+ ConfigurationPolicyStoreInterface() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_