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

Unified Diff: chrome/browser/chromeos/dom_ui/internet_options_handler.cc

Issue 4237001: Add support for different type of encyrption when adding a network.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/options/wifi_config_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dom_ui/internet_options_handler.cc
===================================================================
--- chrome/browser/chromeos/dom_ui/internet_options_handler.cc (revision 64675)
+++ chrome/browser/chromeos/dom_ui/internet_options_handler.cc (working copy)
@@ -158,6 +158,26 @@
localized_strings->SetString("inetShowPass",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHOWPASSWORD));
+ localized_strings->SetString("inetSecurityNone",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_SELECT,
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_NONE)));
+ localized_strings->SetString("inetSecurityWEP",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_SELECT,
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_WEP)));
+ localized_strings->SetString("inetSecurityWPA",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_SELECT,
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_WPA)));
+ localized_strings->SetString("inetSecurityRSN",
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_SELECT,
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY_RSN)));
localized_strings->SetString("inetPassPrompt",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSWORD));
@@ -682,9 +702,9 @@
cros->ConnectToWifiNetwork(
network, password, std::string(), std::string());
} else {
- // Must be an "other" login
- cros->ConnectToWifiNetwork(
- service_path, password, std::string(), std::string(), true);
+ // Network disappeared while the user is connecting to it.
+ // TODO(chocobo): Display error message.
+ LOG(WARNING) << "Cannot find network to connect " << service_path;
}
}
@@ -716,21 +736,34 @@
}
void InternetOptionsHandler::LoginToOtherCallback(const ListValue* args) {
+ std::string security;
std::string ssid;
std::string password;
- if (args->GetSize() != 2 ||
- !args->GetString(0, &ssid) ||
- !args->GetString(1, &password)) {
+ if (args->GetSize() != 3 ||
+ !args->GetString(0, &security) ||
+ !args->GetString(1, &ssid) ||
+ !args->GetString(2, &password)) {
NOTREACHED();
return;
}
+ chromeos::ConnectionSecurity sec = chromeos::SECURITY_UNKNOWN;
+ if (security == "none") {
+ sec = chromeos::SECURITY_NONE;
+ } else if (security == "wep") {
+ sec = chromeos::SECURITY_WEP;
+ } else if (security == "wpa") {
+ sec = chromeos::SECURITY_WPA;
+ } else if (security == "rsn") {
+ sec = chromeos::SECURITY_RSN;
+ }
+
chromeos::NetworkLibrary* cros =
chromeos::CrosLibrary::Get()->GetNetworkLibrary();
- cros->ConnectToWifiNetwork(
- ssid, password, std::string(), std::string(), true);
+ cros->ConnectToWifiNetwork(sec, ssid, password, std::string(), std::string(),
+ true);
}
void InternetOptionsHandler::ButtonClickCallback(const ListValue* args) {
@@ -934,7 +967,7 @@
if (cros->wifi_enabled()) {
list->Append(GetNetwork(
kOtherNetworksFakePath,
- SkBitmap(),
+ *rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_BARS0_BLACK),
l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_OTHER_NETWORKS),
false,
false,
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/options/wifi_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698