blob: 1d100847ba9847c8af71c4c33e0ef1db681ad1e3 [file] [log] [blame]
Alex Deymoc705cc82014-02-19 11:15:00 -08001// Copyright (c) 2014 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_DEFAULT_POLICY_H
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_DEFAULT_POLICY_H
7
8#include "update_engine/policy_manager/policy.h"
9
10namespace chromeos_policy_manager {
11
12// The DefaultPolicy is a safe Policy implementation that doesn't fail. The
13// values returned by this policy are safe default in case of failure of the
14// actual policy being used by the PolicyManager.
15class DefaultPolicy : public Policy {
16 public:
17 DefaultPolicy() {}
18 virtual ~DefaultPolicy() {}
19
20 // Policy overrides.
21 virtual EvalStatus UpdateCheckAllowed(EvaluationContext* ec,
22 std::string* error,
23 bool* result) const {
24 *result = true;
25 return EvalStatusSucceeded;
26 }
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(DefaultPolicy);
30};
31
32} // namespace chromeos_policy_manager
33
34#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_DEFAULT_POLICY_H