Chromium Code Reviews| Index: components/arc/net/arc_net_host_impl.cc |
| diff --git a/components/arc/net/arc_net_host_impl.cc b/components/arc/net/arc_net_host_impl.cc |
| index 7582d0e5e31d9ca9070b8bac68bda2174d00d89c..ab0dd8e071692d849897a57f5e76b7f6d24e6614 100644 |
| --- a/components/arc/net/arc_net_host_impl.cc |
| +++ b/components/arc/net/arc_net_host_impl.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/time/time.h" |
| #include "chromeos/network/network_handler.h" |
| #include "chromeos/network/network_state_handler.h" |
| +#include "chromeos/network/network_type_pattern.h" |
| #include "chromeos/network/network_util.h" |
| #include "chromeos/network/onc/onc_utils.h" |
| #include "components/arc/arc_bridge_service.h" |
| @@ -140,10 +141,19 @@ void ArcNetHostImpl::GetWifiEnabledState( |
| const GetWifiEnabledStateCallback& callback) { |
| bool is_enabled = GetStateHandler()->IsTechnologyEnabled( |
| chromeos::NetworkTypePattern::WiFi()); |
| - |
| callback.Run(is_enabled); |
| } |
| +void ArcNetHostImpl::SetWifiEnabledState( |
| + bool is_enabled, |
| + const SetWifiEnabledStateCallback& callback) { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + GetStateHandler()->SetTechnologyEnabled( |
| + chromeos::NetworkTypePattern::WiFi(), is_enabled, |
| + chromeos::network_handler::ErrorCallback()); |
|
dcheng
2016/03/15 23:19:43
Out of curiosity... how are you supposed to know i
stevenjb
2016/03/15 23:31:31
There's an email thread discussing this. Right now
|
| + callback.Run(); |
| +} |
| + |
| void ArcNetHostImpl::StartScan() { |
| GetStateHandler()->RequestScan(); |
| } |