blob: 0885593aa7003a20bc7bd67466a4b8697d25a4e9 [file] [log] [blame]
Marc-Antoine Courteau311a7cec2017-12-14 21:18:491// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_LANGUAGE_POLICY_HANDLER_H_
6#define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_LANGUAGE_POLICY_HANDLER_H_
7
Guillaume Jenkinsf9cf4e32019-03-12 19:54:558#include <vector>
9
Marc-Antoine Courteau311a7cec2017-12-14 21:18:4910#include "base/macros.h"
11#include "components/policy/core/browser/configuration_policy_handler.h"
12
13// ConfigurationPolicyHandler for the SpellcheckLanguage policy.
14class SpellcheckLanguagePolicyHandler
15 : public policy::TypeCheckingPolicyHandler {
16 public:
17 SpellcheckLanguagePolicyHandler();
Peter Boström53c6c5952021-09-17 09:41:2618
19 SpellcheckLanguagePolicyHandler(const SpellcheckLanguagePolicyHandler&) =
20 delete;
21 SpellcheckLanguagePolicyHandler& operator=(
22 const SpellcheckLanguagePolicyHandler&) = delete;
23
Marc-Antoine Courteau311a7cec2017-12-14 21:18:4924 ~SpellcheckLanguagePolicyHandler() override;
25
26 // ConfigurationPolicyHandler:
27 bool CheckPolicySettings(const policy::PolicyMap& policies,
28 policy::PolicyErrorMap* errors) override;
29 void ApplyPolicySettings(const policy::PolicyMap& policies,
30 PrefValueMap* prefs) override;
31
32 private:
Guillaume Jenkinsf9cf4e32019-03-12 19:54:5533 void SortForcedLanguages(const policy::PolicyMap& policies,
34 std::vector<base::Value>* const forced,
35 std::vector<std::string>* const unknown);
Marc-Antoine Courteau311a7cec2017-12-14 21:18:4936};
37
38#endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_LANGUAGE_POLICY_HANDLER_H_