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

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

Issue 10562036: Deprecate and re-wire the ClearSiteDataOnExit policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 8 years, 6 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
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/configuration_policy_handler.h
diff --git a/chrome/browser/policy/configuration_policy_handler.h b/chrome/browser/policy/configuration_policy_handler.h
index 6b75800f0ad32344a23a65d8f30b79d5185bd9a4..73913d7f42a90fc1ab1ead263ab9952098de845d 100644
--- a/chrome/browser/policy/configuration_policy_handler.h
+++ b/chrome/browser/policy/configuration_policy_handler.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/values.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
+#include "chrome/common/content_settings.h"
class PrefValueMap;
@@ -355,6 +356,31 @@ class JavascriptPolicyHandler : public ConfigurationPolicyHandler {
DISALLOW_COPY_AND_ASSIGN(JavascriptPolicyHandler);
};
+// Handles the (deprecated) ClearSiteDataOnExit policy.
+// TODO(mnissler): Remove the policy eventually (http://crbug.com/133291).
+class ClearSiteDataOnExitPolicyHandler : public TypeCheckingPolicyHandler {
+ public:
+ ClearSiteDataOnExitPolicyHandler();
+ virtual ~ClearSiteDataOnExitPolicyHandler();
+
+ // ConfigurationPolicyHandler methods:
+ virtual bool CheckPolicySettings(const PolicyMap& policies,
+ PolicyErrorMap* errors) OVERRIDE;
+ virtual void ApplyPolicySettings(const PolicyMap& policies,
+ PrefValueMap* prefs) OVERRIDE;
+
+ private:
+ // Checks whether the clear site data policy is enabled in |policies|.
+ bool ClearSiteDataEnabled(const PolicyMap& policies);
+
+ // Checks |policies| for the cookies setting and returns it in
+ // |content_setting|. Returns true if the setting is found, false if not.
+ static bool GetContentSetting(const PolicyMap& policies,
+ ContentSetting* content_setting);
+
+ DISALLOW_COPY_AND_ASSIGN(ClearSiteDataOnExitPolicyHandler);
+};
+
// Handles RestoreOnStartup policy.
class RestoreOnStartupPolicyHandler : public TypeCheckingPolicyHandler {
public:
« no previous file with comments | « chrome/app/policy/policy_templates.json ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698