derekjchow | 15b3f07 | 2015-06-03 00:01:43 | [diff] [blame] | 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. |
| 4 | |
| 5 | #include "chromecast/net/fake_connectivity_checker.h" |
| 6 | |
| 7 | namespace chromecast { |
| 8 | |
| 9 | FakeConnectivityChecker::FakeConnectivityChecker() |
| 10 | : ConnectivityChecker(), |
| 11 | connected_(true) { |
| 12 | } |
| 13 | |
| 14 | FakeConnectivityChecker::~FakeConnectivityChecker() {} |
| 15 | |
| 16 | bool FakeConnectivityChecker::Connected() const { |
| 17 | return connected_; |
| 18 | } |
| 19 | |
| 20 | void FakeConnectivityChecker::Check() { |
| 21 | } |
| 22 | |
| 23 | void FakeConnectivityChecker::SetConnectedForTest(bool connected) { |
| 24 | if (connected_ == connected) |
| 25 | return; |
| 26 | |
| 27 | connected_ = connected; |
derekjchow | d9fddc2 | 2015-06-03 18:15:46 | [diff] [blame] | 28 | Notify(connected); |
derekjchow | 15b3f07 | 2015-06-03 00:01:43 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | } // namespace chromecast |