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

Side by Side Diff: chromeos/network/network_util.cc

Issue 332713003: Fix FirstNetworkByType, and some minor debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698