• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "chrome/browser/local_discovery/wifi/wifi_manager.h"
6 
7 namespace local_discovery {
8 
9 namespace wifi {
10 
11 namespace {
12 
13 WifiManagerFactory* g_factory = NULL;
14 
15 }  // namespace
16 
Create()17 scoped_ptr<WifiManager> WifiManager::Create() {
18   if (g_factory) {
19     return g_factory->CreateWifiManager();
20   }
21 
22   return CreateDefault();
23 }
24 
SetFactory(WifiManagerFactory * factory)25 void WifiManager::SetFactory(WifiManagerFactory* factory) {
26   g_factory = factory;
27 }
28 
FromPSK(const std::string & psk)29 WifiCredentials WifiCredentials::FromPSK(const std::string& psk) {
30   WifiCredentials return_value;
31   return_value.psk = psk;
32   return return_value;
33 }
34 
35 }  // namespace wifi
36 
37 }  // namespace local_discovery
38