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

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

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.cc
diff --git a/chrome/browser/local_discovery/wifi/wifi_manager.cc b/chrome/browser/local_discovery/wifi/wifi_manager.cc
index b8e74f705aa41b79b188cf30b5fb934aae47bc42..c59c0beaaebb11b9df68db5720ce386cfeae1974 100644
--- a/chrome/browser/local_discovery/wifi/wifi_manager.cc
+++ b/chrome/browser/local_discovery/wifi/wifi_manager.cc
@@ -8,6 +8,24 @@ namespace local_discovery {
namespace wifi {
+namespace {
+
+WifiManagerFactory* g_factory = NULL;
+
+} // namespace
+
+scoped_ptr<WifiManager> WifiManager::Create() {
+ if (g_factory) {
+ return g_factory->CreateWifiManager();
+ }
+
+ return CreateDefault();
+}
+
+void WifiManager::SetFactory(WifiManagerFactory* factory) {
+ g_factory = factory;
+}
+
WifiCredentials WifiCredentials::FromPSK(const std::string& psk) {
WifiCredentials return_value;
return_value.psk = psk;
« no previous file with comments | « chrome/browser/local_discovery/wifi/wifi_manager.h ('k') | chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698