Chromium Code Reviews| Index: remoting/test/fake_host_list_fetcher.h |
| diff --git a/remoting/test/fake_host_list_fetcher.h b/remoting/test/fake_host_list_fetcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..16ac39dcfefb10eaeaeb0643eb1a28ac4ce58a36 |
| --- /dev/null |
| +++ b/remoting/test/fake_host_list_fetcher.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ |
| +#define REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ |
| + |
| +#include "remoting/test/host_list_fetcher.h" |
| + |
| +namespace remoting { |
| +namespace test { |
| + |
| +// Used to fake retrieving the host list without making any actual calls to the |
| +// directory service for information. |
| +class FakeHostListFetcher : public HostListFetcher { |
| + public: |
| + FakeHostListFetcher(); |
| + ~FakeHostListFetcher() override; |
| + |
| + // HostListFetcher interface. |
| + void RetrieveHostlist(const std::string& access_token, |
| + const HostlistCallback& callback) override; |
| + |
| + void set_retrieved_host_list(const std::vector<HostInfo>& host_list) { |
| + host_list_ = host_list; |
| + } |
|
joedow
2015/07/15 03:04:53
I think there is supposed to be a space between th
tonychun
2015/07/15 17:24:49
Done.
|
| + private: |
| + std::vector<HostInfo> host_list_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(FakeHostListFetcher); |
| +}; |
| + |
| +} // namespace test |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ |