Disable app banners on ChromeOS.
[chromium-blink-merge.git] / remoting / test / fake_remote_host_info_fetcher.cc
blobc97f2e4ebcb42c5f90d4946271010f72b5b90834
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"
7 namespace remoting {
8 namespace test {
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;
26 } else {
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_;
36 } // namespace test
37 } // namespace remoting