OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/options/vpn_config_view.h" | 5 #include "chrome/browser/chromeos/options/vpn_config_view.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/cros/cros_library.h" | 9 #include "chrome/browser/chromeos/cros/cros_library.h" |
10 #include "chrome/browser/chromeos/login/user_manager.h" | 10 #include "chrome/browser/chromeos/login/user_manager.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE)))); | 414 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE)))); |
415 if (!vpn) { | 415 if (!vpn) { |
416 provider_type_combobox_ = | 416 provider_type_combobox_ = |
417 new views::Combobox(new ProviderTypeComboboxModel()); | 417 new views::Combobox(new ProviderTypeComboboxModel()); |
418 provider_type_combobox_->set_listener(this); | 418 provider_type_combobox_->set_listener(this); |
419 layout->AddView(provider_type_combobox_); | 419 layout->AddView(provider_type_combobox_); |
420 provider_type_text_label_ = NULL; | 420 provider_type_text_label_ = NULL; |
421 } else { | 421 } else { |
422 provider_type_text_label_ = | 422 provider_type_text_label_ = |
423 new views::Label(UTF16ToWide(ProviderTypeToString(provider_type_))); | 423 new views::Label(UTF16ToWide(ProviderTypeToString(provider_type_))); |
| 424 provider_type_text_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
424 layout->AddView(provider_type_text_label_); | 425 layout->AddView(provider_type_text_label_); |
425 provider_type_combobox_ = NULL; | 426 provider_type_combobox_ = NULL; |
426 } | 427 } |
427 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 428 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
428 | 429 |
429 // PSK passphrase label, input and visible button. | 430 // PSK passphrase label, input and visible button. |
430 layout->StartRow(0, column_view_set_id); | 431 layout->StartRow(0, column_view_set_id); |
431 psk_passphrase_label_ = new views::Label(UTF16ToWide( | 432 psk_passphrase_label_ = new views::Label(UTF16ToWide( |
432 l10n_util::GetStringUTF16( | 433 l10n_util::GetStringUTF16( |
433 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PSK_PASSPHRASE))); | 434 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PSK_PASSPHRASE))); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 views::Textfield* textfield, bool trim_whitespace) const { | 639 views::Textfield* textfield, bool trim_whitespace) const { |
639 std::string untrimmed = UTF16ToUTF8(textfield->text()); | 640 std::string untrimmed = UTF16ToUTF8(textfield->text()); |
640 if (!trim_whitespace) | 641 if (!trim_whitespace) |
641 return untrimmed; | 642 return untrimmed; |
642 std::string result; | 643 std::string result; |
643 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); | 644 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); |
644 return result; | 645 return result; |
645 } | 646 } |
646 | 647 |
647 } // namespace chromeos | 648 } // namespace chromeos |
OLD | NEW |