| 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 "chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h" | 5 #include "chrome/browser/local_discovery/wifi/wifi_manager_nonchromeos.h" |
| 6 | 6 |
| 7 #include "base/cancelable_callback.h" | 7 #include "base/cancelable_callback.h" |
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 base::DictionaryValue* wifi = new base::DictionaryValue; | 30 base::DictionaryValue* wifi = new base::DictionaryValue; |
| 31 properties->Set(onc::network_config::kWiFi, wifi); | 31 properties->Set(onc::network_config::kWiFi, wifi); |
| 32 | 32 |
| 33 wifi->SetString(onc::wifi::kSSID, ssid); | 33 wifi->SetString(onc::wifi::kSSID, ssid); |
| 34 if (!password.empty()) { | 34 if (!password.empty()) { |
| 35 wifi->SetString(onc::wifi::kPassphrase, password); | 35 wifi->SetString(onc::wifi::kPassphrase, password); |
| 36 // TODO(noamsml): Allow choosing security mechanism in a more fine-grained | 36 // TODO(noamsml): Allow choosing security mechanism in a more fine-grained |
| 37 // manner. | 37 // manner. |
| 38 wifi->SetString(onc::wifi::kSecurity, onc::wifi::kWPA2_PSK); | 38 wifi->SetString(onc::wifi::kSecurity, onc::wifi::kWPA2_PSK); |
| 39 } else { | 39 } else { |
| 40 wifi->SetString(onc::wifi::kSecurity, onc::wifi::kNone); | 40 wifi->SetString(onc::wifi::kSecurity, onc::wifi::kSecurityNone); |
| 41 } | 41 } |
| 42 | 42 |
| 43 return properties.Pass(); | 43 return properties.Pass(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 class WifiManagerNonChromeos::WifiServiceWrapper | 48 class WifiManagerNonChromeos::WifiServiceWrapper |
| 49 : public net::NetworkChangeNotifier::NetworkChangeObserver { | 49 : public net::NetworkChangeNotifier::NetworkChangeObserver { |
| 50 public: | 50 public: |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 void WifiManagerNonChromeos::RemoveNetworkListObserver( | 523 void WifiManagerNonChromeos::RemoveNetworkListObserver( |
| 524 NetworkListObserver* observer) { | 524 NetworkListObserver* observer) { |
| 525 network_list_observers_.RemoveObserver(observer); | 525 network_list_observers_.RemoveObserver(observer); |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace wifi | 528 } // namespace wifi |
| 529 | 529 |
| 530 } // namespace local_discovery | 530 } // namespace local_discovery |
| OLD | NEW |