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

Unified Diff: chrome/browser/policy/autofill_policy_handler.cc

Issue 140803003: Move the Autofill and URLBlacklist policy handlers to the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trying again... Created 6 years, 11 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
Index: chrome/browser/policy/autofill_policy_handler.cc
diff --git a/chrome/browser/policy/autofill_policy_handler.cc b/chrome/browser/policy/autofill_policy_handler.cc
deleted file mode 100644
index 6175bd6a27865ca94f68b3fc709c45673ce8078c..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/autofill_policy_handler.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 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.
-
-#include "chrome/browser/policy/autofill_policy_handler.h"
-
-#include "base/prefs/pref_value_map.h"
-#include "base/values.h"
-#include "components/autofill/core/common/autofill_pref_names.h"
-#include "components/policy/core/common/policy_map.h"
-#include "policy/policy_constants.h"
-
-namespace policy {
-
-AutofillPolicyHandler::AutofillPolicyHandler()
- : TypeCheckingPolicyHandler(key::kAutoFillEnabled,
- base::Value::TYPE_BOOLEAN) {}
-
-AutofillPolicyHandler::~AutofillPolicyHandler() {
-}
-
-void AutofillPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
- PrefValueMap* prefs) {
- const base::Value* value = policies.GetValue(policy_name());
- bool auto_fill_enabled;
- if (value && value->GetAsBoolean(&auto_fill_enabled) && !auto_fill_enabled) {
- prefs->SetValue(autofill::prefs::kAutofillEnabled,
- base::Value::CreateBooleanValue(false));
- }
-}
-
-} // namespace policy
« no previous file with comments | « chrome/browser/policy/autofill_policy_handler.h ('k') | chrome/browser/policy/autofill_policy_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698