| 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/common/net/x509_certificate_model.h" | 10 #include "chrome/common/net/x509_certificate_model.h" |
| 11 #include "grit/chromium_strings.h" | 11 #include "grit/chromium_strings.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 #include "grit/locale_settings.h" | 13 #include "grit/locale_settings.h" |
| 14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
| 15 #include "net/base/cert_database.h" | 15 #include "net/base/cert_database.h" |
| 16 #include "net/base/x509_certificate.h" | 16 #include "net/base/x509_certificate.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/models/combobox_model.h" | 18 #include "ui/base/models/combobox_model.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
| 20 #include "ui/views/layout/grid_layout.h" |
| 21 #include "ui/views/layout/layout_constants.h" |
| 20 #include "views/controls/label.h" | 22 #include "views/controls/label.h" |
| 21 #include "views/controls/textfield/textfield.h" | 23 #include "views/controls/textfield/textfield.h" |
| 22 #include "views/layout/grid_layout.h" | |
| 23 #include "views/layout/layout_constants.h" | |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Root CA certificates that are built into Chrome use this token name. | 27 // Root CA certificates that are built into Chrome use this token name. |
| 28 const char* const kRootCertificateTokenName = "Builtin Object Token"; | 28 const char* const kRootCertificateTokenName = "Builtin Object Token"; |
| 29 | 29 |
| 30 string16 ProviderTypeToString(chromeos::ProviderType type) { | 30 string16 ProviderTypeToString(chromeos::ProviderType type) { |
| 31 switch (type) { | 31 switch (type) { |
| 32 case chromeos::PROVIDER_TYPE_L2TP_IPSEC_PSK: | 32 case chromeos::PROVIDER_TYPE_L2TP_IPSEC_PSK: |
| 33 return l10n_util::GetStringUTF16( | 33 return l10n_util::GetStringUTF16( |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 return std::string(); | 750 return std::string(); |
| 751 std::string untrimmed = UTF16ToUTF8(textfield->text()); | 751 std::string untrimmed = UTF16ToUTF8(textfield->text()); |
| 752 if (!trim_whitespace) | 752 if (!trim_whitespace) |
| 753 return untrimmed; | 753 return untrimmed; |
| 754 std::string result; | 754 std::string result; |
| 755 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); | 755 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); |
| 756 return result; | 756 return result; |
| 757 } | 757 } |
| 758 | 758 |
| 759 } // namespace chromeos | 759 } // namespace chromeos |
| OLD | NEW |