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

Side by Side Diff: chrome/browser/ui/webui/chromeos/about_network.cc

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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
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 "chrome/browser/ui/webui/chromeos/about_network.h" 5 #include "chrome/browser/ui/webui/chromeos/about_network.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 WrapWithTD(network->roaming()) + 260 WrapWithTD(network->roaming()) +
261 WrapWithTD(base::IntToString(network->cellular_out_of_credits())) + 261 WrapWithTD(base::IntToString(network->cellular_out_of_credits())) +
262 WrapWithTD(base::IntToString(network->signal_strength())) + 262 WrapWithTD(base::IntToString(network->signal_strength())) +
263 WrapWithTD(base::IntToString(network->auto_connect())) + 263 WrapWithTD(base::IntToString(network->auto_connect())) +
264 WrapWithTD(base::IntToString(network->favorite())) + 264 WrapWithTD(base::IntToString(network->favorite())) +
265 WrapWithTD(base::IntToString(network->priority())); 265 WrapWithTD(base::IntToString(network->priority()));
266 return WrapWithTR(str); 266 return WrapWithTR(str);
267 } 267 }
268 268
269 std::string GetNetworkStateHtmlInfo() { 269 std::string GetNetworkStateHtmlInfo() {
270 NetworkStateHandler* handler = NetworkStateHandler::Get(); 270 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
271 NetworkStateHandler::NetworkStateList network_list; 271 NetworkStateHandler::NetworkStateList network_list;
272 handler->GetNetworkList(&network_list); 272 handler->GetNetworkList(&network_list);
273 273
274 std::string output; 274 std::string output;
275 output.append(WrapWithH3( 275 output.append(WrapWithH3(
276 l10n_util::GetStringUTF8(IDS_ABOUT_NETWORK_NETWORKS))); 276 l10n_util::GetStringUTF8(IDS_ABOUT_NETWORK_NETWORKS)));
277 output.append("<table border=1>"); 277 output.append("<table border=1>");
278 output.append(NetworkStateToHtmlTableHeader()); 278 output.append(NetworkStateToHtmlTableHeader());
279 for (NetworkStateHandler::NetworkStateList::iterator iter = 279 for (NetworkStateHandler::NetworkStateList::iterator iter =
280 network_list.begin(); iter != network_list.end(); ++iter) { 280 network_list.begin(); iter != network_list.end(); ++iter) {
(...skipping 19 matching lines...) Expand all
300 output += GetNetworkStateHtmlInfo(); 300 output += GetNetworkStateHtmlInfo();
301 } else { 301 } else {
302 output += GetCrosNetworkHtmlInfo(); 302 output += GetCrosNetworkHtmlInfo();
303 } 303 }
304 return output; 304 return output;
305 } 305 }
306 306
307 } // namespace about_ui 307 } // namespace about_ui
308 308
309 } // namespace chromeos 309 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698