blob: 3393656fc3c9f26f531ae04c4e2106da5bc0bdc4 [file] [log] [blame]
robpercival3de53402016-01-12 16:29:021// Copyright 2015 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// Automatically generated by testing/gmock/scripts/generator/gmock_gen.py.
6// Manual edits:
7// - Copyright header added.
8// - Includes and inclusion guard added.
9// - Constructor and destructor added to satisfy chromium-style checker.
10
11#ifndef COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_
12#define COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_
13
Joshua Pawlicki0499ac82017-08-17 18:29:0714#include <memory>
waffles77255cc2016-08-02 17:25:1215#include <string>
16#include <vector>
17
robpercival3de53402016-01-12 16:29:0218#include "base/callback.h"
19#include "base/sequenced_task_runner.h"
20#include "components/component_updater/component_updater_service.h"
21#include "testing/gmock/include/gmock/gmock.h"
22
23namespace component_updater {
24
25class MockComponentUpdateService : public ComponentUpdateService {
26 public:
27 MockComponentUpdateService();
28 ~MockComponentUpdateService() override;
29
30 MOCK_METHOD1(AddObserver,
31 void(Observer* observer));
32 MOCK_METHOD1(RemoveObserver,
33 void(Observer* observer));
34 MOCK_METHOD1(RegisterComponent,
35 bool(const CrxComponent& component));
36 MOCK_METHOD1(UnregisterComponent,
37 bool(const std::string& id));
38 MOCK_CONST_METHOD0(GetComponentIDs,
39 std::vector<std::string>());
waffles77255cc2016-08-02 17:25:1240 MOCK_CONST_METHOD1(
41 GetComponentForMimeType,
42 std::unique_ptr<ComponentInfo>(const std::string& mime_type));
Joshua Pawlicki0499ac82017-08-17 18:29:0743 MOCK_CONST_METHOD0(GetComponents, std::vector<ComponentInfo>());
robpercival3de53402016-01-12 16:29:0244 MOCK_METHOD0(GetOnDemandUpdater,
45 OnDemandUpdater&());
46 MOCK_METHOD2(MaybeThrottle,
47 void(const std::string& id, const base::Closure& callback));
48 MOCK_METHOD0(GetSequencedTaskRunner,
49 scoped_refptr<base::SequencedTaskRunner>());
50 MOCK_CONST_METHOD2(GetComponentDetails,
51 bool(const std::string& id, CrxUpdateItem* item));
52};
53
54} // namespace component_updater
55
56#endif // COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_