1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_BOOTSTRAPPING_NETWORK_SWITCHER_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_BOOTSTRAPPING_NETWORK_SWITCHER_H_
10 #include "base/callback.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/local_discovery/wifi/wifi_manager.h"
14 namespace local_discovery
{
18 class BootstrappingNetworkSwitcher
{
20 typedef base::Callback
<void(bool success
)> SuccessCallback
;
22 BootstrappingNetworkSwitcher(WifiManager
* wifi_manager
,
23 const std::string
& connect_ssid
,
24 const SuccessCallback
& callback
);
25 ~BootstrappingNetworkSwitcher();
32 void OnGotNetworkList(const NetworkPropertiesList
& networks
);
34 void OnConnectStatus(bool status
);
36 WifiManager
* wifi_manager_
;
37 std::string connect_ssid_
;
38 SuccessCallback callback_
;
40 std::string return_guid_
;
43 base::WeakPtrFactory
<BootstrappingNetworkSwitcher
> weak_factory_
;
48 } // namespace local_discovery
50 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_BOOTSTRAPPING_NETWORK_SWITCHER_H_