1// Copyright 2013 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_MOCK_USER_CLOUD_POLICY_STORE_H_
6#define COMPONENTS_POLICY_CORE_COMMON_CLOUD_MOCK_USER_CLOUD_POLICY_STORE_H_
7
8#include "components/policy/core/common/cloud/user_cloud_policy_store.h"
9#include "testing/gmock/include/gmock/gmock.h"
10
11namespace policy {
12
13class MockUserCloudPolicyStore : public UserCloudPolicyStore {
14 public:
15  MockUserCloudPolicyStore();
16  virtual ~MockUserCloudPolicyStore();
17
18  MOCK_METHOD1(Store, void(const enterprise_management::PolicyFetchResponse&));
19  MOCK_METHOD0(Load, void(void));
20  MOCK_METHOD0(LoadImmediately, void(void));
21  MOCK_METHOD0(Clear, void(void));
22
23  // Publish the protected members.
24  using CloudPolicyStore::NotifyStoreLoaded;
25  using CloudPolicyStore::NotifyStoreError;
26
27  using CloudPolicyStore::policy_map_;
28  using CloudPolicyStore::policy_;
29  using CloudPolicyStore::status_;
30  using UserCloudPolicyStore::signin_username_;
31
32 private:
33  DISALLOW_COPY_AND_ASSIGN(MockUserCloudPolicyStore);
34};
35
36}  // namespace policy
37
38#endif  // COMPONENTS_POLICY_CORE_COMMON_CLOUD_MOCK_USER_CLOUD_POLICY_STORE_H_
39