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

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: Removed callback in StartScan prototype. 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
« no previous file with comments | « 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..24405aaa2b5dde920e335cdb6d61604e2dd0d7d8 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,14 @@ 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() {
+ GetStateHandler()->RequestScan();
dcheng 2016/02/13 02:32:01 How does ARC++ know when this is done?
abhishekbh 2016/02/16 22:00:05 This API mimics the Android startScan API which is
+}
+
} // namespace arc
« no previous file with comments | « 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