| OLD | NEW |
| 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/dom_ui/internet_options_handler.h" | 5 #include "chrome/browser/chromeos/dom_ui/internet_options_handler.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | |
| 14 #include "base/base64.h" | 13 #include "base/base64.h" |
| 15 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 16 #include "base/callback.h" | 15 #include "base/callback.h" |
| 17 #include "base/i18n/time_formatting.h" | 16 #include "base/i18n/time_formatting.h" |
| 18 #include "base/string16.h" | 17 #include "base/string16.h" |
| 19 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 20 #include "base/time.h" | 19 #include "base/time.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "base/values.h" | 21 #include "base/values.h" |
| 23 #include "chrome/browser/browser_list.h" | 22 #include "chrome/browser/browser_list.h" |
| 24 #include "chrome/browser/browser_window.h" | 23 #include "chrome/browser/browser_window.h" |
| 25 #include "chrome/browser/chromeos/cros/cros_library.h" | 24 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 26 #include "chrome/browser/chromeos/login/ownership_service.h" | 25 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 27 #include "chrome/browser/chromeos/status/network_menu.h" | 26 #include "chrome/browser/chromeos/status/network_menu.h" |
| 28 #include "chrome/browser/dom_ui/dom_ui_util.h" | 27 #include "chrome/browser/dom_ui/dom_ui_util.h" |
| 29 #include "chrome/browser/ui/browser.h" | 28 #include "chrome/browser/ui/browser.h" |
| 30 #include "chrome/browser/ui/views/window.h" | 29 #include "chrome/browser/ui/views/window.h" |
| 31 #include "chrome/common/time_format.h" | 30 #include "chrome/common/time_format.h" |
| 32 #include "grit/browser_resources.h" | 31 #include "grit/browser_resources.h" |
| 33 #include "grit/chromium_strings.h" | 32 #include "grit/chromium_strings.h" |
| 34 #include "grit/generated_resources.h" | 33 #include "grit/generated_resources.h" |
| 35 #include "grit/locale_settings.h" | 34 #include "grit/locale_settings.h" |
| 36 #include "grit/theme_resources.h" | 35 #include "grit/theme_resources.h" |
| 36 #include "third_party/skia/include/core/SkBitmap.h" |
| 37 #include "ui/base/resource/resource_bundle.h" |
| 37 #include "views/window/window.h" | 38 #include "views/window/window.h" |
| 38 #include "third_party/skia/include/core/SkBitmap.h" | |
| 39 | 39 |
| 40 static const char kOtherNetworksFakePath[] = "?"; | 40 static const char kOtherNetworksFakePath[] = "?"; |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 // Format the hardware address like "0011AA22BB33" => "00:11:AA:22:BB:33". | 44 // Format the hardware address like "0011AA22BB33" => "00:11:AA:22:BB:33". |
| 45 std::string FormatHardwareAddress(const std::string& address) { | 45 std::string FormatHardwareAddress(const std::string& address) { |
| 46 std::string output; | 46 std::string output; |
| 47 for (size_t i = 0; i < address.size(); ++i) { | 47 for (size_t i = 0; i < address.size(); ++i) { |
| 48 if (i != 0 && i % 2 == 0) { | 48 if (i != 0 && i % 2 == 0) { |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 void InternetOptionsHandler::FillNetworkInfo( | 1029 void InternetOptionsHandler::FillNetworkInfo( |
| 1030 DictionaryValue* dictionary, chromeos::NetworkLibrary* cros) { | 1030 DictionaryValue* dictionary, chromeos::NetworkLibrary* cros) { |
| 1031 dictionary->Set("wiredList", GetWiredList()); | 1031 dictionary->Set("wiredList", GetWiredList()); |
| 1032 dictionary->Set("wirelessList", GetWirelessList()); | 1032 dictionary->Set("wirelessList", GetWirelessList()); |
| 1033 dictionary->Set("rememberedList", GetRememberedList()); | 1033 dictionary->Set("rememberedList", GetRememberedList()); |
| 1034 dictionary->SetBoolean("wifiAvailable", cros->wifi_available()); | 1034 dictionary->SetBoolean("wifiAvailable", cros->wifi_available()); |
| 1035 dictionary->SetBoolean("wifiEnabled", cros->wifi_enabled()); | 1035 dictionary->SetBoolean("wifiEnabled", cros->wifi_enabled()); |
| 1036 dictionary->SetBoolean("cellularAvailable", cros->cellular_available()); | 1036 dictionary->SetBoolean("cellularAvailable", cros->cellular_available()); |
| 1037 dictionary->SetBoolean("cellularEnabled", cros->cellular_enabled()); | 1037 dictionary->SetBoolean("cellularEnabled", cros->cellular_enabled()); |
| 1038 } | 1038 } |
| OLD | NEW |