Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: components/arc/net/arc_net_host_impl.cc

Issue 1680483002: ARC: Implement the startScan API to start scanning of WiFI APs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« components/arc/common/net.mojom ('K') | « components/arc/net/arc_net_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bca78b13c03447ef42e2e64027f8a2d93671a298..f7a4aa5073fad6091563aa85e004d60937d59b5d 100644
--- a/components/arc/net/arc_net_host_impl.cc
+++ b/components/arc/net/arc_net_host_impl.cc
@@ -26,6 +26,10 @@ const int kGetNetworksListLimit = 100;
namespace arc {
+chromeos::NetworkStateHandler* GetStateHandler() {
+ return chromeos::NetworkHandler::Get()->network_state_handler();
+}
+
ArcNetHostImpl::ArcNetHostImpl(ArcBridgeService* bridge_service)
: ArcService(bridge_service), binding_(this) {
arc_bridge_service()->AddObserver(this);
@@ -100,12 +104,15 @@ void ArcNetHostImpl::GetNetworks(bool configured_only,
void ArcNetHostImpl::GetWifiEnabledState(
const GetWifiEnabledStateCallback& callback) {
- chromeos::NetworkStateHandler* handler =
- chromeos::NetworkHandler::Get()->network_state_handler();
- bool is_enabled =
- handler->IsTechnologyEnabled(chromeos::NetworkTypePattern::WiFi());
+ bool is_enabled = GetStateHandler()->IsTechnologyEnabled(
+ chromeos::NetworkTypePattern::WiFi());
callback.Run(is_enabled);
}
+void ArcNetHostImpl::StartScan(const StartScanCallback& callback) {
+ GetStateHandler()->RequestScan();
+ callback.Run(true);
Luis Héctor Chávez 2016/02/08 16:35:46 Why add this if it is always going to be true? If
abhishekbh 2016/02/12 02:17:33 Removed.
+}
+
} // namespace arc
« components/arc/common/net.mojom ('K') | « components/arc/net/arc_net_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698