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) {
14 FakeRemoteHostInfoFetcher::~FakeRemoteHostInfoFetcher() {
17 bool FakeRemoteHostInfoFetcher::RetrieveRemoteHostInfo(
18 const std::string
& application_id
,
19 const std::string
& access_token
,
20 ServiceEnvironment service_environment
,
21 const RemoteHostInfoCallback
& callback
) {
22 RemoteHostInfo remote_host_info
;
24 if (fail_retrieve_remote_host_info_
) {
25 remote_host_info
.remote_host_status
= kRemoteHostStatusPending
;
27 remote_host_info
.remote_host_status
= kRemoteHostStatusReady
;
28 remote_host_info
.application_id
= application_id
;
31 callback
.Run(remote_host_info
);
33 return !fail_retrieve_remote_host_info_
;
37 } // namespace remoting