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 "components/wifi/network_properties.h" | 5 #include "components/wifi/network_properties.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
11 | 11 |
12 namespace wifi { | 12 namespace wifi { |
13 | 13 |
14 NetworkProperties::NetworkProperties() | 14 NetworkProperties::NetworkProperties() |
15 : connection_state(onc::connection_state::kNotConnected), | 15 : connection_state(onc::connection_state::kNotConnected), |
16 security(onc::wifi::kSecurityNone), | 16 security(onc::wifi::kSecurityNone), |
17 signal_strength(0), | 17 signal_strength(0), |
18 auto_connect(false), | 18 auto_connect(false), |
19 frequency(kFrequencyUnknown) { | 19 frequency(kFrequencyUnknown) { |
20 } | 20 } |
21 | 21 |
| 22 NetworkProperties::NetworkProperties(const NetworkProperties& other) = default; |
| 23 |
22 NetworkProperties::~NetworkProperties() { | 24 NetworkProperties::~NetworkProperties() { |
23 } | 25 } |
24 | 26 |
25 scoped_ptr<base::DictionaryValue> NetworkProperties::ToValue( | 27 scoped_ptr<base::DictionaryValue> NetworkProperties::ToValue( |
26 bool network_list) const { | 28 bool network_list) const { |
27 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 29 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
28 | 30 |
29 value->SetString(onc::network_config::kGUID, guid); | 31 value->SetString(onc::network_config::kGUID, guid); |
30 value->SetString(onc::network_config::kName, name); | 32 value->SetString(onc::network_config::kName, name); |
31 value->SetString(onc::network_config::kConnectionState, connection_state); | 33 value->SetString(onc::network_config::kConnectionState, connection_state); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (l.type == r.type) | 108 if (l.type == r.type) |
107 return l.guid < r.guid; | 109 return l.guid < r.guid; |
108 if (l.type == onc::network_type::kEthernet) | 110 if (l.type == onc::network_type::kEthernet) |
109 return true; | 111 return true; |
110 if (r.type == onc::network_type::kEthernet) | 112 if (r.type == onc::network_type::kEthernet) |
111 return false; | 113 return false; |
112 return l.type > r.type; | 114 return l.type > r.type; |
113 } | 115 } |
114 | 116 |
115 } // namespace wifi | 117 } // namespace wifi |
OLD | NEW |