OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ | 5 #ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ |
6 #define CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ | 6 #define CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/observer_list_threadsafe.h" | 12 #include "base/observer_list_threadsafe.h" |
13 | 13 |
14 class GURL; | |
15 | |
16 namespace base { | 14 namespace base { |
17 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
18 } | 16 } |
19 | 17 |
20 namespace chromecast { | 18 namespace chromecast { |
21 | 19 |
22 // Checks if internet connectivity is available. | 20 // Checks if internet connectivity is available. |
23 class ConnectivityChecker | 21 class ConnectivityChecker |
24 : public base::RefCountedThreadSafe<ConnectivityChecker> { | 22 : public base::RefCountedThreadSafe<ConnectivityChecker> { |
25 public: | 23 public: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 59 |
62 const scoped_refptr<base::ObserverListThreadSafe<ConnectivityObserver>> | 60 const scoped_refptr<base::ObserverListThreadSafe<ConnectivityObserver>> |
63 connectivity_observer_list_; | 61 connectivity_observer_list_; |
64 | 62 |
65 DISALLOW_COPY_AND_ASSIGN(ConnectivityChecker); | 63 DISALLOW_COPY_AND_ASSIGN(ConnectivityChecker); |
66 }; | 64 }; |
67 | 65 |
68 } // namespace chromecast | 66 } // namespace chromecast |
69 | 67 |
70 #endif // CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ | 68 #endif // CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ |
OLD | NEW |