| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 } else { | 536 } else { |
| 537 group_name_label_ = NULL; | 537 group_name_label_ = NULL; |
| 538 group_name_textfield_ = NULL; | 538 group_name_textfield_ = NULL; |
| 539 } | 539 } |
| 540 | 540 |
| 541 // Error label. | 541 // Error label. |
| 542 layout->StartRow(0, column_view_set_id); | 542 layout->StartRow(0, column_view_set_id); |
| 543 layout->SkipColumns(1); | 543 layout->SkipColumns(1); |
| 544 error_label_ = new views::Label(); | 544 error_label_ = new views::Label(); |
| 545 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 545 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 546 error_label_->SetColor(SK_ColorRED); | 546 error_label_->set_auto_color_readability_enabled(false); |
| 547 error_label_->SetEnabledColor(SK_ColorRED); |
| 547 layout->AddView(error_label_); | 548 layout->AddView(error_label_); |
| 548 | 549 |
| 549 // Set or hide the UI, update comboboxes and error labels. | 550 // Set or hide the UI, update comboboxes and error labels. |
| 550 Refresh(); | 551 Refresh(); |
| 551 } | 552 } |
| 552 | 553 |
| 553 void VPNConfigView::Refresh() { | 554 void VPNConfigView::Refresh() { |
| 554 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); | 555 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); |
| 555 | 556 |
| 556 UpdateControls(); | 557 UpdateControls(); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 return std::string(); | 708 return std::string(); |
| 708 std::string untrimmed = UTF16ToUTF8(textfield->text()); | 709 std::string untrimmed = UTF16ToUTF8(textfield->text()); |
| 709 if (!trim_whitespace) | 710 if (!trim_whitespace) |
| 710 return untrimmed; | 711 return untrimmed; |
| 711 std::string result; | 712 std::string result; |
| 712 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); | 713 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); |
| 713 return result; | 714 return result; |
| 714 } | 715 } |
| 715 | 716 |
| 716 } // namespace chromeos | 717 } // namespace chromeos |
| OLD | NEW |