OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/network/network_util.h" | 5 #include "chromeos/network/network_util.h" |
6 | 6 |
7 #include "base/strings/string_tokenizer.h" | 7 #include "base/strings/string_tokenizer.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chromeos/network/network_state.h" | 10 #include "chromeos/network/network_state.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 scoped_ptr<base::ListValue> network_properties_list(new base::ListValue); | 164 scoped_ptr<base::ListValue> network_properties_list(new base::ListValue); |
165 for (NetworkStateHandler::NetworkStateList::iterator it = | 165 for (NetworkStateHandler::NetworkStateList::iterator it = |
166 network_states.begin(); | 166 network_states.begin(); |
167 it != network_states.end(); | 167 it != network_states.end(); |
168 ++it) { | 168 ++it) { |
169 scoped_ptr<base::DictionaryValue> onc_dictionary = | 169 scoped_ptr<base::DictionaryValue> onc_dictionary = |
170 TranslateNetworkStateToONC(*it); | 170 TranslateNetworkStateToONC(*it); |
171 | 171 |
172 if (debugging_properties) { | 172 if (debugging_properties) { |
| 173 onc_dictionary->SetBoolean("connectable", (*it)->connectable()); |
173 onc_dictionary->SetBoolean("visible", (*it)->visible()); | 174 onc_dictionary->SetBoolean("visible", (*it)->visible()); |
174 onc_dictionary->SetString("profile_path", (*it)->profile_path()); | 175 onc_dictionary->SetString("profile_path", (*it)->profile_path()); |
175 std::string onc_source = (*it)->ui_data().GetONCSourceAsString(); | 176 std::string onc_source = (*it)->ui_data().GetONCSourceAsString(); |
176 if (!onc_source.empty()) | 177 if (!onc_source.empty()) |
177 onc_dictionary->SetString("onc_source", onc_source); | 178 onc_dictionary->SetString("onc_source", onc_source); |
178 } | 179 } |
179 | 180 |
180 network_properties_list->Append(onc_dictionary.release()); | 181 network_properties_list->Append(onc_dictionary.release()); |
181 } | 182 } |
182 return network_properties_list.Pass(); | 183 return network_properties_list.Pass(); |
183 } | 184 } |
184 | 185 |
185 } // namespace network_util | 186 } // namespace network_util |
186 } // namespace chromeos | 187 } // namespace chromeos |
OLD | NEW |