1 // 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.
5 #include "remoting/test/fake_remote_host_info_fetcher.h"
10 FakeRemoteHostInfoFetcher::FakeRemoteHostInfoFetcher() :
11 fail_retrieve_remote_host_info_(false) {}
13 FakeRemoteHostInfoFetcher::~FakeRemoteHostInfoFetcher() {}
15 bool FakeRemoteHostInfoFetcher::RetrieveRemoteHostInfo(
16 const std::string
& application_id
,
17 const std::string
& access_token
,
18 ServiceEnvironment service_environment
,
19 const RemoteHostInfoCallback
& callback
) {
20 RemoteHostInfo remote_host_info
;
22 if (fail_retrieve_remote_host_info_
) {
23 remote_host_info
.remote_host_status
= kRemoteHostStatusPending
;
25 remote_host_info
.remote_host_status
= kRemoteHostStatusReady
;
26 remote_host_info
.application_id
= application_id
;
29 callback
.Run(remote_host_info
);
31 return !fail_retrieve_remote_host_info_
;
35 } // namespace remoting