OLD | NEW |
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 "base/cancelable_callback.h" | 5 #include "base/cancelable_callback.h" |
6 #include "base/threading/sequenced_worker_pool.h" | 6 #include "base/threading/sequenced_worker_pool.h" |
7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
8 #include "chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h" | 8 #include "chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h" |
9 #include "components/onc/onc_constants.h" | 9 #include "components/onc/onc_constants.h" |
10 #include "components/wifi/wifi_service.h" | 10 #include "components/wifi/wifi_service.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 it != ssid_list.end(); | 425 it != ssid_list.end(); |
426 ++it) { | 426 ++it) { |
427 if (it->connected && it->internal_id == network_guid) { | 427 if (it->connected && it->internal_id == network_guid) { |
428 return true; | 428 return true; |
429 } | 429 } |
430 } | 430 } |
431 | 431 |
432 return false; | 432 return false; |
433 } | 433 } |
434 | 434 |
435 scoped_ptr<WifiManager> WifiManager::Create() { | 435 scoped_ptr<WifiManager> WifiManager::CreateDefault() { |
436 return scoped_ptr<WifiManager>(new WifiManagerNonChromeos()); | 436 return scoped_ptr<WifiManager>(new WifiManagerNonChromeos()); |
437 } | 437 } |
438 | 438 |
439 WifiManagerNonChromeos::WifiManagerNonChromeos() | 439 WifiManagerNonChromeos::WifiManagerNonChromeos() |
440 : wifi_wrapper_(NULL), weak_factory_(this) { | 440 : wifi_wrapper_(NULL), weak_factory_(this) { |
441 } | 441 } |
442 | 442 |
443 WifiManagerNonChromeos::~WifiManagerNonChromeos() { | 443 WifiManagerNonChromeos::~WifiManagerNonChromeos() { |
444 if (wifi_wrapper_) { | 444 if (wifi_wrapper_) { |
445 content::BrowserThread::DeleteSoon( | 445 content::BrowserThread::DeleteSoon( |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 network_list_observers_.AddObserver(observer); | 541 network_list_observers_.AddObserver(observer); |
542 } | 542 } |
543 | 543 |
544 void WifiManagerNonChromeos::RemoveObserver(NetworkListWatcherImpl* observer) { | 544 void WifiManagerNonChromeos::RemoveObserver(NetworkListWatcherImpl* observer) { |
545 network_list_observers_.RemoveObserver(observer); | 545 network_list_observers_.RemoveObserver(observer); |
546 } | 546 } |
547 | 547 |
548 } // namespace wifi | 548 } // namespace wifi |
549 | 549 |
550 } // namespace local_discovery | 550 } // namespace local_discovery |
OLD | NEW |