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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/status/power_menu_button.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/cros/network_library.h" 5 #include "chrome/browser/chromeos/cros/network_library.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } 519 }
520 } 520 }
521 return ipconfig_vector; 521 return ipconfig_vector;
522 } 522 }
523 523
524 std::string NetworkLibraryImpl::GetHtmlInfo(int refresh) { 524 std::string NetworkLibraryImpl::GetHtmlInfo(int refresh) {
525 std::string output; 525 std::string output;
526 output.append("<html><head><title>About Network</title>"); 526 output.append("<html><head><title>About Network</title>");
527 if (refresh > 0) 527 if (refresh > 0)
528 output.append("<meta http-equiv=\"refresh\" content=\"" + 528 output.append("<meta http-equiv=\"refresh\" content=\"" +
529 IntToString(refresh) + "\"/>"); 529 base::IntToString(refresh) + "\"/>");
530 output.append("</head><body>"); 530 output.append("</head><body>");
531 if (refresh > 0) 531 if (refresh > 0) {
532 output.append("(Auto-refreshing page every " + IntToString(refresh) + "s)"); 532 output.append("(Auto-refreshing page every " +
533 else 533 base::IntToString(refresh) + "s)");
534 } else {
534 output.append("(To auto-refresh this page: about:network/&lt;secs&gt;)"); 535 output.append("(To auto-refresh this page: about:network/&lt;secs&gt;)");
536 }
535 537
536 output.append("<h3>Ethernet:</h3><table border=1>"); 538 output.append("<h3>Ethernet:</h3><table border=1>");
537 output.append("<tr>" + ToHtmlTableHeader(&ethernet_) + "</tr>"); 539 output.append("<tr>" + ToHtmlTableHeader(&ethernet_) + "</tr>");
538 output.append("<tr>" + ToHtmlTableRow(&ethernet_) + "</tr>"); 540 output.append("<tr>" + ToHtmlTableRow(&ethernet_) + "</tr>");
539 541
540 output.append("</table><h3>Wifi:</h3><table border=1>"); 542 output.append("</table><h3>Wifi:</h3><table border=1>");
541 for (size_t i = 0; i < wifi_networks_.size(); ++i) { 543 for (size_t i = 0; i < wifi_networks_.size(); ++i) {
542 if (i == 0) 544 if (i == 0)
543 output.append("<tr>" + ToHtmlTableHeader(&wifi_networks_[i]) + "</tr>"); 545 output.append("<tr>" + ToHtmlTableHeader(&wifi_networks_[i]) + "</tr>");
544 output.append("<tr>" + ToHtmlTableRow(&wifi_networks_[i]) + "</tr>"); 546 output.append("<tr>" + ToHtmlTableRow(&wifi_networks_[i]) + "</tr>");
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 if (ethernet_connected()) 890 if (ethernet_connected())
889 return ethernet_.ip_address(); 891 return ethernet_.ip_address();
890 if (wifi_connected()) 892 if (wifi_connected())
891 return wifi_.ip_address(); 893 return wifi_.ip_address();
892 if (cellular_connected()) 894 if (cellular_connected())
893 return cellular_.ip_address(); 895 return cellular_.ip_address();
894 return ethernet_.ip_address(); 896 return ethernet_.ip_address();
895 } 897 }
896 898
897 } // namespace chromeos 899 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/status/power_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698