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

Unified Diff: chrome/browser/local_discovery/wifi/wifi_manager.h

Issue 288043004: Bootstrapping device lister plus tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wifi_lib1
Patch Set: Created 6 years, 7 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
Index: chrome/browser/local_discovery/wifi/wifi_manager.h
diff --git a/chrome/browser/local_discovery/wifi/wifi_manager.h b/chrome/browser/local_discovery/wifi/wifi_manager.h
index 07175e204dc7aff4f420421f15b1185cd52f0bb7..b5726b644f2b1b665afa57e5d997c0fce849c966 100644
--- a/chrome/browser/local_discovery/wifi/wifi_manager.h
+++ b/chrome/browser/local_discovery/wifi/wifi_manager.h
@@ -41,6 +41,8 @@ struct WifiCredentials {
std::string psk;
};
+class WifiManagerFactory;
+
// A class to manage listing, connecting to, and getting the credentials of WiFi
// networks.
class WifiManager {
@@ -56,6 +58,8 @@ class WifiManager {
static scoped_ptr<WifiManager> Create();
+ static void SetFactory(WifiManagerFactory* factory);
+
// Start the wifi manager. This must be called before any other method calls.
virtual void Start() = 0;
@@ -90,6 +94,16 @@ class WifiManager {
// it changes.
virtual scoped_ptr<NetworkListWatcher> CreateNetworkListWatcher(
const SSIDListCallback& callback) = 0;
+
+ private:
+ static scoped_ptr<WifiManager> CreateDefault();
+};
+
+class WifiManagerFactory {
+ public:
+ virtual ~WifiManagerFactory() {}
+
+ virtual scoped_ptr<WifiManager> CreateWifiManager() = 0;
};
} // namespace wifi

Powered by Google App Engine
This is Rietveld 408576698