| 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/options2/chromeos/internet_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 { "activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE }, | 331 { "activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE }, |
| 332 { "buyplanButton", IDS_OPTIONS_SETTINGS_BUY_PLAN }, | 332 { "buyplanButton", IDS_OPTIONS_SETTINGS_BUY_PLAN }, |
| 333 { "connectButton", IDS_OPTIONS_SETTINGS_CONNECT }, | 333 { "connectButton", IDS_OPTIONS_SETTINGS_CONNECT }, |
| 334 { "disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT }, | 334 { "disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT }, |
| 335 { "viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT }, | 335 { "viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT }, |
| 336 | 336 |
| 337 // Wifi Tab. | 337 // Wifi Tab. |
| 338 | 338 |
| 339 { "accessLockedMsg", IDS_STATUSBAR_NETWORK_LOCKED }, | 339 { "accessLockedMsg", IDS_STATUSBAR_NETWORK_LOCKED }, |
| 340 { "inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID }, | 340 { "inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID }, |
| 341 { "inetBssid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_BSSID }, |
| 341 { "inetEncryption", | 342 { "inetEncryption", |
| 342 IDS_OPTIONS_SETTIGNS_INTERNET_OPTIONS_NETWORK_ENCRYPTION }, | 343 IDS_OPTIONS_SETTIGNS_INTERNET_OPTIONS_NETWORK_ENCRYPTION }, |
| 344 { "inetFrequency", |
| 345 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY }, |
| 346 { "inetFrequencyFormat", |
| 347 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY_MHZ }, |
| 348 { "inetSignalStrength", |
| 349 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH }, |
| 350 { "inetSignalStrengthFormat", |
| 351 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH_PERCENTAGE }, |
| 343 { "inetPassProtected", | 352 { "inetPassProtected", |
| 344 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED }, | 353 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED }, |
| 345 { "inetNetworkShared", | 354 { "inetNetworkShared", |
| 346 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED }, | 355 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED }, |
| 347 { "inetPreferredNetwork", | 356 { "inetPreferredNetwork", |
| 348 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK }, | 357 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK }, |
| 349 { "inetAutoConnectNetwork", | 358 { "inetAutoConnectNetwork", |
| 350 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT }, | 359 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT }, |
| 351 { "inetLogin", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_LOGIN }, | 360 { "inetLogin", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_LOGIN }, |
| 352 { "inetShowPass", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHOWPASSWORD }, | 361 { "inetShowPass", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHOWPASSWORD }, |
| 353 { "inetPassPrompt", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSWORD }, | 362 { "inetPassPrompt", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSWORD }, |
| 354 { "inetSsidPrompt", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SSID }, | 363 { "inetSsidPrompt", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SSID }, |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 | 891 |
| 883 void InternetOptionsHandler::PopulateWifiDetails( | 892 void InternetOptionsHandler::PopulateWifiDetails( |
| 884 const chromeos::WifiNetwork* wifi, | 893 const chromeos::WifiNetwork* wifi, |
| 885 DictionaryValue* dictionary) { | 894 DictionaryValue* dictionary) { |
| 886 dictionary->SetString("ssid", wifi->name()); | 895 dictionary->SetString("ssid", wifi->name()); |
| 887 bool remembered = (wifi->profile_type() != chromeos::PROFILE_NONE); | 896 bool remembered = (wifi->profile_type() != chromeos::PROFILE_NONE); |
| 888 dictionary->SetBoolean("remembered", remembered); | 897 dictionary->SetBoolean("remembered", remembered); |
| 889 bool shared = wifi->profile_type() == chromeos::PROFILE_SHARED; | 898 bool shared = wifi->profile_type() == chromeos::PROFILE_SHARED; |
| 890 dictionary->SetBoolean("shared", shared); | 899 dictionary->SetBoolean("shared", shared); |
| 891 dictionary->SetString("encryption", wifi->GetEncryptionString()); | 900 dictionary->SetString("encryption", wifi->GetEncryptionString()); |
| 901 dictionary->SetString("bssid", wifi->bssid()); |
| 902 dictionary->SetInteger("frequency", wifi->frequency()); |
| 903 dictionary->SetInteger("strength", wifi->strength()); |
| 892 } | 904 } |
| 893 | 905 |
| 894 DictionaryValue* InternetOptionsHandler::CreateDictionaryFromCellularApn( | 906 DictionaryValue* InternetOptionsHandler::CreateDictionaryFromCellularApn( |
| 895 const chromeos::CellularApn& apn) { | 907 const chromeos::CellularApn& apn) { |
| 896 DictionaryValue* dictionary = new DictionaryValue(); | 908 DictionaryValue* dictionary = new DictionaryValue(); |
| 897 dictionary->SetString("apn", apn.apn); | 909 dictionary->SetString("apn", apn.apn); |
| 898 dictionary->SetString("networkId", apn.network_id); | 910 dictionary->SetString("networkId", apn.network_id); |
| 899 dictionary->SetString("username", apn.username); | 911 dictionary->SetString("username", apn.username); |
| 900 dictionary->SetString("password", apn.password); | 912 dictionary->SetString("password", apn.password); |
| 901 dictionary->SetString("name", apn.name); | 913 dictionary->SetString("name", apn.name); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 if (default_value) | 1292 if (default_value) |
| 1281 value_dict->Set("default", default_value->DeepCopy()); | 1293 value_dict->Set("default", default_value->DeepCopy()); |
| 1282 if (ui_data.managed()) | 1294 if (ui_data.managed()) |
| 1283 value_dict->SetString("controlledBy", "policy"); | 1295 value_dict->SetString("controlledBy", "policy"); |
| 1284 else if (ui_data.recommended()) | 1296 else if (ui_data.recommended()) |
| 1285 value_dict->SetString("controlledBy", "recommended"); | 1297 value_dict->SetString("controlledBy", "recommended"); |
| 1286 settings->Set(key, value_dict); | 1298 settings->Set(key, value_dict); |
| 1287 } | 1299 } |
| 1288 | 1300 |
| 1289 } // namespace options2 | 1301 } // namespace options2 |
| OLD | NEW |