Index: components/wifi/wifi_service_win.cc |
diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc |
index cd99a0077c4c535d34459160c705e4094f3a3cd2..9cb9a29d247eac1fb0e8f879257274083fea0416 100644 |
--- a/components/wifi/wifi_service_win.cc |
+++ b/components/wifi/wifi_service_win.cc |
@@ -706,6 +706,14 @@ void WiFiServiceImpl::SetEventObservers( |
message_loop_proxy_.swap(message_loop_proxy); |
networks_changed_observer_ = networks_changed_observer; |
network_list_changed_observer_ = network_list_changed_observer; |
+ // Start listening to WLAN notifications. |
+ WlanRegisterNotification_function_(client_, |
tbarzic
2014/02/25 20:40:49
Should this be protected from multiple |SetEventOb
mef
2014/02/25 22:36:26
Done.
|
+ WLAN_NOTIFICATION_SOURCE_ALL, |
+ FALSE, |
+ OnWlanNotificationCallback, |
+ this, |
+ NULL, |
+ NULL); |
} |
void WiFiServiceImpl::OnWlanNotificationCallback( |
@@ -943,13 +951,6 @@ DWORD WiFiServiceImpl::OpenClientHandle() { |
break; |
} |
} |
- WlanRegisterNotification_function_(client_, |
- WLAN_NOTIFICATION_SOURCE_ALL, |
- FALSE, |
- OnWlanNotificationCallback, |
- this, |
- NULL, |
- NULL); |
} else { |
error = ERROR_NOINTERFACE; |
} |