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 "chromecast/net/connectivity_checker.h"
9 // A simple fake connectivity checker for testing. Will appeared to be
10 // connected by default.
11 class FakeConnectivityChecker
: public ConnectivityChecker
{
13 FakeConnectivityChecker();
15 // ConnectivityChecker implementation:
16 bool Connected() const override
;
17 void Check() override
;
19 // Sets connectivity and notifies observers if it has changed.
20 void SetConnectedForTest(bool connected
);
23 ~FakeConnectivityChecker() override
;
26 friend class base::RefCountedThreadSafe
<FakeConnectivityChecker
>;
29 DISALLOW_COPY_AND_ASSIGN(FakeConnectivityChecker
);
32 } // namespace chromecast