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

Side by Side Diff: chrome/browser/policy/configuration_policy_handler.h

Issue 15199006: Retire ClearSiteDataOnExit policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // ConfigurationPolicyHandler methods: 493 // ConfigurationPolicyHandler methods:
494 virtual bool CheckPolicySettings(const PolicyMap& policies, 494 virtual bool CheckPolicySettings(const PolicyMap& policies,
495 PolicyErrorMap* errors) OVERRIDE; 495 PolicyErrorMap* errors) OVERRIDE;
496 virtual void ApplyPolicySettings(const PolicyMap& policies, 496 virtual void ApplyPolicySettings(const PolicyMap& policies,
497 PrefValueMap* prefs) OVERRIDE; 497 PrefValueMap* prefs) OVERRIDE;
498 498
499 private: 499 private:
500 DISALLOW_COPY_AND_ASSIGN(JavascriptPolicyHandler); 500 DISALLOW_COPY_AND_ASSIGN(JavascriptPolicyHandler);
501 }; 501 };
502 502
503 // Handles the (deprecated) ClearSiteDataOnExit policy.
504 // TODO(mnissler): Remove the policy eventually (http://crbug.com/133291).
505 class ClearSiteDataOnExitPolicyHandler : public TypeCheckingPolicyHandler {
506 public:
507 ClearSiteDataOnExitPolicyHandler();
508 virtual ~ClearSiteDataOnExitPolicyHandler();
509
510 // ConfigurationPolicyHandler methods:
511 virtual bool CheckPolicySettings(const PolicyMap& policies,
512 PolicyErrorMap* errors) OVERRIDE;
513 virtual void ApplyPolicySettings(const PolicyMap& policies,
514 PrefValueMap* prefs) OVERRIDE;
515
516 private:
517 // Checks whether the clear site data policy is enabled in |policies|.
518 bool ClearSiteDataEnabled(const PolicyMap& policies);
519
520 // Checks |policies| for the cookies setting and returns it in
521 // |content_setting|. Returns true if the setting is found, false if not.
522 static bool GetContentSetting(const PolicyMap& policies,
523 ContentSetting* content_setting);
524
525 DISALLOW_COPY_AND_ASSIGN(ClearSiteDataOnExitPolicyHandler);
526 };
527
528 // Handles RestoreOnStartup policy. 503 // Handles RestoreOnStartup policy.
529 class RestoreOnStartupPolicyHandler : public TypeCheckingPolicyHandler { 504 class RestoreOnStartupPolicyHandler : public TypeCheckingPolicyHandler {
530 public: 505 public:
531 RestoreOnStartupPolicyHandler(); 506 RestoreOnStartupPolicyHandler();
532 virtual ~RestoreOnStartupPolicyHandler(); 507 virtual ~RestoreOnStartupPolicyHandler();
533 508
534 // ConfigurationPolicyHandler methods: 509 // ConfigurationPolicyHandler methods:
535 virtual bool CheckPolicySettings(const PolicyMap& policies, 510 virtual bool CheckPolicySettings(const PolicyMap& policies,
536 PolicyErrorMap* errors) OVERRIDE; 511 PolicyErrorMap* errors) OVERRIDE;
537 virtual void ApplyPolicySettings(const PolicyMap& policies, 512 virtual void ApplyPolicySettings(const PolicyMap& policies,
538 PrefValueMap* prefs) OVERRIDE; 513 PrefValueMap* prefs) OVERRIDE;
539 514
540 private: 515 private:
541 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, 516 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies,
542 PrefValueMap* prefs); 517 PrefValueMap* prefs);
543 518
544 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); 519 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler);
545 }; 520 };
546 521
547 } // namespace policy 522 } // namespace policy
548 523
549 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 524 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
OLDNEW
« 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