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..be77ca099dfe493e687402076dc7d258a291b7c2 |
--- /dev/null |
+++ b/remoting/test/fake_host_list_fetcher.h |
@@ -0,0 +1,37 @@ |
+// 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; |
+ } |
+ |
+ private: |
+ std::vector<HostInfo> host_list_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FakeHostListFetcher); |
+}; |
+ |
+} // namespace test |
+} // namespace remoting |
+ |
+#endif // REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_ |