blob: 508863cd1ed8f3fcf7e9ce12d2bdd574ebce859e [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>
Sorin Jianua8ef73d2017-11-02 16:55:1716#include <utility>
waffles77255cc2016-08-02 17:25:1217#include <vector>
18
robpercival3de53402016-01-12 16:29:0219#include "base/callback.h"
20#include "base/sequenced_task_runner.h"
21#include "components/component_updater/component_updater_service.h"
22#include "testing/gmock/include/gmock/gmock.h"
23
24namespace component_updater {
25
26class MockComponentUpdateService : public ComponentUpdateService {
27 public:
28 MockComponentUpdateService();
29 ~MockComponentUpdateService() override;
30
Daniel Cheng67848522018-04-27 22:04:4131 void MaybeThrottle(const std::string& id,
32 base::OnceClosure callback) override {
Sorin Jianua8ef73d2017-11-02 16:55:1733 DoMaybeThrottle(id, std::move(callback));
34 }
35
robpercival3de53402016-01-12 16:29:0236 MOCK_METHOD1(AddObserver,
37 void(Observer* observer));
38 MOCK_METHOD1(RemoveObserver,
39 void(Observer* observer));
40 MOCK_METHOD1(RegisterComponent,
41 bool(const CrxComponent& component));
42 MOCK_METHOD1(UnregisterComponent,
43 bool(const std::string& id));
44 MOCK_CONST_METHOD0(GetComponentIDs,
45 std::vector<std::string>());
waffles77255cc2016-08-02 17:25:1246 MOCK_CONST_METHOD1(
47 GetComponentForMimeType,
48 std::unique_ptr<ComponentInfo>(const std::string& mime_type));
Joshua Pawlicki0499ac82017-08-17 18:29:0749 MOCK_CONST_METHOD0(GetComponents, std::vector<ComponentInfo>());
robpercival3de53402016-01-12 16:29:0250 MOCK_METHOD0(GetOnDemandUpdater,
51 OnDemandUpdater&());
Sorin Jianua8ef73d2017-11-02 16:55:1752 MOCK_METHOD2(DoMaybeThrottle,
53 void(const std::string& id, const base::OnceClosure& callback));
robpercival3de53402016-01-12 16:29:0254 MOCK_METHOD0(GetSequencedTaskRunner,
55 scoped_refptr<base::SequencedTaskRunner>());
56 MOCK_CONST_METHOD2(GetComponentDetails,
57 bool(const std::string& id, CrxUpdateItem* item));
58};
59
60} // namespace component_updater
61
62#endif // COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_