diff options
author | benchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 06:20:10 +0000 |
---|---|---|
committer | benchan@chromium.org <benchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 06:20:10 +0000 |
commit | aacbd60053f92761ea1fd55d08335b1b9ac06c87 (patch) | |
tree | 199511e614b53a628d8340ef928c9a7eeb673929 /chrome/browser/chromeos/options | |
parent | a5b8eb29db3e53d7d63bbe08583079be0a2d7067 (diff) | |
download | chromium_src-aacbd60053f92761ea1fd55d08335b1b9ac06c87.zip chromium_src-aacbd60053f92761ea1fd55d08335b1b9ac06c87.tar.gz chromium_src-aacbd60053f92761ea1fd55d08335b1b9ac06c87.tar.bz2 |
Make VPN UI to show masked PSK and user passphrase only when they are set.
flimflam now uses the PassphraseRequired and L2TPIPsec.PSKRequired
property to indicate whether the PSK or user passphrase is missing in a
VPN profile. Related CLs:
https://gerrit.chromium.org/gerrit/17340
https://gerrit.chromium.org/gerrit/17341
This CL modifies the VPN configuration dialog to only show masked PSK
and user passphrase when they are set.
BUG=chromium-os:27042
TEST=Tested the following:
1. emerge-x86-generic chromeos-chrome
2. Import the following ONC L2TP/IPsec VPN profiles:
- Both PSK and user passphrase are set
- Only PSK is set
- Only user passphrase is set
- Neither PSK nor user passphrase is set
Verify that the PSK/user passphrase field in the VPN configuration
dialog show a masked value only when the PSK/user passphrase is set.
3. Import the following ONC OpenVPN profiles:
- User passphrase is set
- User passphrase is not set
Verify that the user passphrase field in the VPN configuration
dialog show a masked value only when the user passphrase is set.
Review URL: http://codereview.chromium.org/9553004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options')
-rw-r--r-- | chrome/browser/chromeos/options/vpn_config_view.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc index f9654d1..db218f9 100644 --- a/chrome/browser/chromeos/options/vpn_config_view.cc +++ b/chrome/browser/chromeos/options/vpn_config_view.cc @@ -481,7 +481,8 @@ void VPNConfigView::Init(VirtualNetwork* vpn) { psk_passphrase_label_ = new views::Label(l10n_util::GetStringUTF16( IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PSK_PASSPHRASE)); layout->AddView(psk_passphrase_label_); - psk_passphrase_textfield_ = new PassphraseTextfield(vpn); + bool has_psk_passphrase = vpn && !vpn->IsPSKPassphraseRequired(); + psk_passphrase_textfield_ = new PassphraseTextfield(has_psk_passphrase); psk_passphrase_textfield_->SetController(this); layout->AddView(psk_passphrase_textfield_); layout->AddView( @@ -546,7 +547,8 @@ void VPNConfigView::Init(VirtualNetwork* vpn) { layout->StartRow(0, column_view_set_id); layout->AddView(new views::Label(l10n_util::GetStringUTF16( IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USER_PASSPHRASE))); - user_passphrase_textfield_ = new PassphraseTextfield(vpn); + bool has_user_passphrase = vpn && !vpn->IsUserPassphraseRequired(); + user_passphrase_textfield_ = new PassphraseTextfield(has_user_passphrase); user_passphrase_textfield_->SetController(this); user_passphrase_textfield_->SetEnabled(user_passphrase_ui_data_.editable()); layout->AddView(user_passphrase_textfield_); |