| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 friend class TetherServiceTest; | 98 friend class TetherServiceTest; |
| 99 FRIEND_TEST_ALL_PREFIXES(TetherServiceTest, TestFeatureFlagEnabled); | 99 FRIEND_TEST_ALL_PREFIXES(TetherServiceTest, TestFeatureFlagEnabled); |
| 100 | 100 |
| 101 void OnBluetoothAdapterFetched( | 101 void OnBluetoothAdapterFetched( |
| 102 scoped_refptr<device::BluetoothAdapter> adapter); | 102 scoped_refptr<device::BluetoothAdapter> adapter); |
| 103 | 103 |
| 104 bool IsBluetoothAvailable() const; | 104 bool IsBluetoothAvailable() const; |
| 105 | 105 |
| 106 bool IsCellularAvailableButNotEnabled() const; |
| 107 |
| 106 // Whether Tether is allowed to be used. If the controlling preference | 108 // Whether Tether is allowed to be used. If the controlling preference |
| 107 // is set (from policy), this returns the preference value. Otherwise, it is | 109 // is set (from policy), this returns the preference value. Otherwise, it is |
| 108 // permitted if the flag is enabled. | 110 // permitted if the flag is enabled. |
| 109 bool IsAllowedByPolicy() const; | 111 bool IsAllowedByPolicy() const; |
| 110 | 112 |
| 111 // Whether Tether is enabled. | 113 // Whether Tether is enabled. |
| 112 bool IsEnabledbyPreference() const; | 114 bool IsEnabledbyPreference() const; |
| 113 | 115 |
| 114 // Whether the service has been shut down. | 116 // Whether the service has been shut down. |
| 115 bool shut_down_ = false; | 117 bool shut_down_ = false; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 126 | 128 |
| 127 PrefChangeRegistrar registrar_; | 129 PrefChangeRegistrar registrar_; |
| 128 scoped_refptr<device::BluetoothAdapter> adapter_; | 130 scoped_refptr<device::BluetoothAdapter> adapter_; |
| 129 | 131 |
| 130 base::WeakPtrFactory<TetherService> weak_ptr_factory_; | 132 base::WeakPtrFactory<TetherService> weak_ptr_factory_; |
| 131 | 133 |
| 132 DISALLOW_COPY_AND_ASSIGN(TetherService); | 134 DISALLOW_COPY_AND_ASSIGN(TetherService); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 #endif // CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ | 137 #endif // CHROME_BROWSER_CHROMEOS_TETHER_TETHER_SERVICE_H_ |
| OLD | NEW |