| 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 "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/strings/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 WrapWithTD(network->roaming()) + | 111 WrapWithTD(network->roaming()) + |
| 112 WrapWithTD(base::IntToString(network->cellular_out_of_credits())) + | 112 WrapWithTD(base::IntToString(network->cellular_out_of_credits())) + |
| 113 WrapWithTD(base::IntToString(network->signal_strength())) + | 113 WrapWithTD(base::IntToString(network->signal_strength())) + |
| 114 WrapWithTD(base::IntToString(network->auto_connect())) + | 114 WrapWithTD(base::IntToString(network->auto_connect())) + |
| 115 WrapWithTD(base::IntToString(network->favorite())) + | 115 WrapWithTD(base::IntToString(network->favorite())) + |
| 116 WrapWithTD(base::IntToString(network->priority())); | 116 WrapWithTD(base::IntToString(network->priority())); |
| 117 return WrapWithTR(str); | 117 return WrapWithTR(str); |
| 118 } | 118 } |
| 119 | 119 |
| 120 std::string GetNetworkStateHtmlInfo() { | 120 std::string GetNetworkStateHtmlInfo() { |
| 121 NetworkStateHandler* handler = NetworkStateHandler::Get(); | 121 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); |
| 122 NetworkStateHandler::NetworkStateList network_list; | 122 NetworkStateHandler::NetworkStateList network_list; |
| 123 handler->GetNetworkList(&network_list); | 123 handler->GetNetworkList(&network_list); |
| 124 | 124 |
| 125 std::string output; | 125 std::string output; |
| 126 output.append(WrapWithH3( | 126 output.append(WrapWithH3( |
| 127 l10n_util::GetStringUTF8(IDS_ABOUT_NETWORK_NETWORKS))); | 127 l10n_util::GetStringUTF8(IDS_ABOUT_NETWORK_NETWORKS))); |
| 128 output.append("<table border=1>"); | 128 output.append("<table border=1>"); |
| 129 output.append(NetworkStateToHtmlTableHeader()); | 129 output.append(NetworkStateToHtmlTableHeader()); |
| 130 for (NetworkStateHandler::NetworkStateList::iterator iter = | 130 for (NetworkStateHandler::NetworkStateList::iterator iter = |
| 131 network_list.begin(); iter != network_list.end(); ++iter) { | 131 network_list.begin(); iter != network_list.end(); ++iter) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 154 std::string output = GetHeaderHtmlInfo(refresh); | 154 std::string output = GetHeaderHtmlInfo(refresh); |
| 155 if (network_event_log::IsInitialized()) | 155 if (network_event_log::IsInitialized()) |
| 156 output += GetEventLogSection(debug); | 156 output += GetEventLogSection(debug); |
| 157 output += GetNetworkStateHtmlInfo(); | 157 output += GetNetworkStateHtmlInfo(); |
| 158 return output; | 158 return output; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace about_ui | 161 } // namespace about_ui |
| 162 | 162 |
| 163 } // namespace chromeos | 163 } // namespace chromeos |
| OLD | NEW |