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

Side by Side 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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/local_discovery/wifi/wifi_manager.h" 5 #include "chrome/browser/local_discovery/wifi/wifi_manager.h"
6 6
7 namespace local_discovery { 7 namespace local_discovery {
8 8
9 namespace wifi { 9 namespace wifi {
10 10
11 namespace {
12
13 WifiManagerFactory* g_factory = NULL;
14
15 } // namespace
16
17 scoped_ptr<WifiManager> WifiManager::Create() {
18 if (g_factory) {
19 return g_factory->CreateWifiManager();
20 }
21
22 return CreateDefault();
23 }
24
25 void WifiManager::SetFactory(WifiManagerFactory* factory) {
26 g_factory = factory;
27 }
28
11 WifiCredentials WifiCredentials::FromPSK(const std::string& psk) { 29 WifiCredentials WifiCredentials::FromPSK(const std::string& psk) {
12 WifiCredentials return_value; 30 WifiCredentials return_value;
13 return_value.psk = psk; 31 return_value.psk = psk;
14 return return_value; 32 return return_value;
15 } 33 }
16 34
17 } // namespace wifi 35 } // namespace wifi
18 36
19 } // namespace local_discovery 37 } // namespace local_discovery
OLDNEW
« 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