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

Side by Side Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 2685663003: [Harmony] Harmonize Chrome OS VPN/Wimax dialogs. (Closed)
Patch Set: . Created 3 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/wimax_config_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 14 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
15 #include "chrome/browser/chromeos/net/shill_error.h" 15 #include "chrome/browser/chromeos/net/shill_error.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
18 #include "chrome/browser/ui/views/layout_utils.h"
17 #include "chrome/common/net/x509_certificate_model.h" 19 #include "chrome/common/net/x509_certificate_model.h"
18 #include "chrome/grit/generated_resources.h" 20 #include "chrome/grit/generated_resources.h"
19 #include "chromeos/login/login_state.h" 21 #include "chromeos/login/login_state.h"
20 #include "chromeos/network/network_configuration_handler.h" 22 #include "chromeos/network/network_configuration_handler.h"
21 #include "chromeos/network/network_connect.h" 23 #include "chromeos/network/network_connect.h"
22 #include "chromeos/network/network_event_log.h" 24 #include "chromeos/network/network_event_log.h"
23 #include "chromeos/network/network_state.h" 25 #include "chromeos/network/network_state.h"
24 #include "chromeos/network/network_state_handler.h" 26 #include "chromeos/network/network_state_handler.h"
25 #include "chromeos/network/network_ui_data.h" 27 #include "chromeos/network/network_ui_data.h"
26 #include "chromeos/network/onc/onc_utils.h" 28 #include "chromeos/network/onc/onc_utils.h"
27 #include "components/onc/onc_constants.h" 29 #include "components/onc/onc_constants.h"
28 #include "third_party/cros_system_api/dbus/service_constants.h" 30 #include "third_party/cros_system_api/dbus/service_constants.h"
29 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
30 #include "ui/base/models/combobox_model.h" 32 #include "ui/base/models/combobox_model.h"
31 #include "ui/events/event.h" 33 #include "ui/events/event.h"
32 #include "ui/views/controls/button/checkbox.h" 34 #include "ui/views/controls/button/checkbox.h"
33 #include "ui/views/controls/combobox/combobox.h" 35 #include "ui/views/controls/combobox/combobox.h"
34 #include "ui/views/controls/label.h" 36 #include "ui/views/controls/label.h"
35 #include "ui/views/controls/textfield/textfield.h" 37 #include "ui/views/controls/textfield/textfield.h"
36 #include "ui/views/layout/grid_layout.h" 38 #include "ui/views/layout/grid_layout.h"
37 #include "ui/views/layout/layout_constants.h"
38 #include "ui/views/widget/widget.h" 39 #include "ui/views/widget/widget.h"
39 #include "ui/views/window/dialog_client_view.h" 40 #include "ui/views/window/dialog_client_view.h"
40 41
41 namespace { 42 namespace {
42 43
43 enum ProviderTypeIndex { 44 enum ProviderTypeIndex {
44 PROVIDER_TYPE_INDEX_L2TP_IPSEC_PSK = 0, 45 PROVIDER_TYPE_INDEX_L2TP_IPSEC_PSK = 0,
45 PROVIDER_TYPE_INDEX_L2TP_IPSEC_USER_CERT = 1, 46 PROVIDER_TYPE_INDEX_L2TP_IPSEC_USER_CERT = 1,
46 PROVIDER_TYPE_INDEX_OPEN_VPN = 2, 47 PROVIDER_TYPE_INDEX_OPEN_VPN = 2,
47 PROVIDER_TYPE_INDEX_MAX = 3, 48 PROVIDER_TYPE_INDEX_MAX = 3,
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return std::string(); 497 return std::string();
497 } 498 }
498 499
499 void VPNConfigView::Init() { 500 void VPNConfigView::Init() {
500 const NetworkState* vpn = NULL; 501 const NetworkState* vpn = NULL;
501 if (!service_path_.empty()) { 502 if (!service_path_.empty()) {
502 vpn = NetworkHandler::Get()->network_state_handler()-> 503 vpn = NetworkHandler::Get()->network_state_handler()->
503 GetNetworkState(service_path_); 504 GetNetworkState(service_path_);
504 DCHECK(vpn && vpn->type() == shill::kTypeVPN); 505 DCHECK(vpn && vpn->type() == shill::kTypeVPN);
505 } 506 }
506 layout_ = views::GridLayout::CreatePanel(this); 507 layout_ = layout_utils::CreatePanelLayout(this);
507 SetLayoutManager(layout_); 508 LayoutDelegate* delegate = LayoutDelegate::Get();
508 509
509 // Observer any changes to the certificate list. 510 // Observer any changes to the certificate list.
510 CertLibrary::Get()->AddObserver(this); 511 CertLibrary::Get()->AddObserver(this);
511 512
512 views::ColumnSet* column_set = layout_->AddColumnSet(0); 513 views::ColumnSet* column_set = layout_->AddColumnSet(0);
513 // Label. 514 // Label.
514 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, 515 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1,
515 views::GridLayout::USE_PREF, 0, 0); 516 views::GridLayout::USE_PREF, 0, 0);
516 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); 517 column_set->AddPaddingColumn(
518 0, delegate->GetMetric(
519 LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
517 // Textfield, combobox. 520 // Textfield, combobox.
518 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 521 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
519 views::GridLayout::USE_PREF, 0, 522 views::GridLayout::USE_PREF, 0,
520 ChildNetworkConfigView::kInputFieldMinWidth); 523 ChildNetworkConfigView::kInputFieldMinWidth);
521 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); 524 column_set->AddPaddingColumn(
525 0, delegate->GetMetric(
526 LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
522 // Policy indicator. 527 // Policy indicator.
523 column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER, 0, 528 column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::CENTER, 0,
524 views::GridLayout::USE_PREF, 0, 0); 529 views::GridLayout::USE_PREF, 0, 0);
525 530
526 // Initialize members. 531 // Initialize members.
527 service_text_modified_ = false; 532 service_text_modified_ = false;
528 title_ = vpn ? IDS_OPTIONS_SETTINGS_JOIN_VPN : IDS_OPTIONS_SETTINGS_ADD_VPN; 533 title_ = vpn ? IDS_OPTIONS_SETTINGS_JOIN_VPN : IDS_OPTIONS_SETTINGS_ADD_VPN;
529 534
530 // By default enable all controls. 535 // By default enable all controls.
531 enable_psk_passphrase_ = true; 536 enable_psk_passphrase_ = true;
532 enable_user_cert_ = true; 537 enable_user_cert_ = true;
533 enable_server_ca_cert_ = true; 538 enable_server_ca_cert_ = true;
534 enable_otp_ = true; 539 enable_otp_ = true;
535 enable_group_name_ = true; 540 enable_group_name_ = true;
536 541
537 // Server label and input. 542 // Server label and input.
538 layout_->StartRow(0, 0); 543 layout_->StartRow(0, 0);
539 views::View* server_label = 544 views::View* server_label =
540 new views::Label(l10n_util::GetStringUTF16( 545 new views::Label(l10n_util::GetStringUTF16(
541 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVER_HOSTNAME)); 546 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVER_HOSTNAME));
542 layout_->AddView(server_label); 547 layout_->AddView(server_label);
543 server_textfield_ = new views::Textfield(); 548 server_textfield_ = new views::Textfield();
544 server_textfield_->set_controller(this); 549 server_textfield_->set_controller(this);
545 layout_->AddView(server_textfield_); 550 layout_->AddView(server_textfield_);
546 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 551 layout_->AddPaddingRow(
552 0, delegate->GetMetric(
553 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
547 if (!service_path_.empty()) { 554 if (!service_path_.empty()) {
548 server_label->SetEnabled(false); 555 server_label->SetEnabled(false);
549 server_textfield_->SetEnabled(false); 556 server_textfield_->SetEnabled(false);
550 } 557 }
551 558
552 // Service label and name or input. 559 // Service label and name or input.
553 layout_->StartRow(0, 0); 560 layout_->StartRow(0, 0);
554 layout_->AddView(new views::Label(l10n_util::GetStringUTF16( 561 layout_->AddView(new views::Label(l10n_util::GetStringUTF16(
555 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVICE_NAME))); 562 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVICE_NAME)));
556 if (service_path_.empty()) { 563 if (service_path_.empty()) {
557 service_textfield_ = new views::Textfield(); 564 service_textfield_ = new views::Textfield();
558 service_textfield_->set_controller(this); 565 service_textfield_->set_controller(this);
559 layout_->AddView(service_textfield_); 566 layout_->AddView(service_textfield_);
560 service_text_ = NULL; 567 service_text_ = NULL;
561 } else { 568 } else {
562 service_text_ = new views::Label(); 569 service_text_ = new views::Label();
563 service_text_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 570 service_text_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
564 layout_->AddView(service_text_); 571 layout_->AddView(service_text_);
565 service_textfield_ = NULL; 572 service_textfield_ = NULL;
566 } 573 }
567 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 574 layout_->AddPaddingRow(
575 0, delegate->GetMetric(
576 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
568 577
569 // Provider type label and select. 578 // Provider type label and select.
570 layout_->StartRow(0, 0); 579 layout_->StartRow(0, 0);
571 layout_->AddView(new views::Label(l10n_util::GetStringUTF16( 580 layout_->AddView(new views::Label(l10n_util::GetStringUTF16(
572 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE))); 581 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE)));
573 if (service_path_.empty()) { 582 if (service_path_.empty()) {
574 provider_type_combobox_model_.reset( 583 provider_type_combobox_model_.reset(
575 new internal::ProviderTypeComboboxModel); 584 new internal::ProviderTypeComboboxModel);
576 provider_type_combobox_ = new views::Combobox( 585 provider_type_combobox_ = new views::Combobox(
577 provider_type_combobox_model_.get()); 586 provider_type_combobox_model_.get());
578 provider_type_combobox_->set_listener(this); 587 provider_type_combobox_->set_listener(this);
579 layout_->AddView(provider_type_combobox_); 588 layout_->AddView(provider_type_combobox_);
580 provider_type_text_label_ = NULL; 589 provider_type_text_label_ = NULL;
581 } else { 590 } else {
582 provider_type_text_label_ = new views::Label(); 591 provider_type_text_label_ = new views::Label();
583 provider_type_text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 592 provider_type_text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
584 layout_->AddView(provider_type_text_label_); 593 layout_->AddView(provider_type_text_label_);
585 provider_type_combobox_ = NULL; 594 provider_type_combobox_ = NULL;
586 } 595 }
587 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 596 layout_->AddPaddingRow(
597 0, delegate->GetMetric(
598 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
588 599
589 // PSK passphrase label, input and visible button. 600 // PSK passphrase label, input and visible button.
590 layout_->StartRow(0, 0); 601 layout_->StartRow(0, 0);
591 psk_passphrase_label_ = new views::Label(l10n_util::GetStringUTF16( 602 psk_passphrase_label_ = new views::Label(l10n_util::GetStringUTF16(
592 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PSK_PASSPHRASE)); 603 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PSK_PASSPHRASE));
593 layout_->AddView(psk_passphrase_label_); 604 layout_->AddView(psk_passphrase_label_);
594 psk_passphrase_textfield_ = new PassphraseTextfield(); 605 psk_passphrase_textfield_ = new PassphraseTextfield();
595 psk_passphrase_textfield_->set_controller(this); 606 psk_passphrase_textfield_->set_controller(this);
596 layout_->AddView(psk_passphrase_textfield_); 607 layout_->AddView(psk_passphrase_textfield_);
597 layout_->AddView( 608 layout_->AddView(
598 new ControlledSettingIndicatorView(psk_passphrase_ui_data_)); 609 new ControlledSettingIndicatorView(psk_passphrase_ui_data_));
599 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 610 layout_->AddPaddingRow(
611 0, delegate->GetMetric(
612 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
600 613
601 // Server CA certificate 614 // Server CA certificate
602 if (service_path_.empty()) { 615 if (service_path_.empty()) {
603 layout_->StartRow(0, 0); 616 layout_->StartRow(0, 0);
604 server_ca_cert_label_ = new views::Label(l10n_util::GetStringUTF16( 617 server_ca_cert_label_ = new views::Label(l10n_util::GetStringUTF16(
605 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_SERVER_CA)); 618 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_SERVER_CA));
606 layout_->AddView(server_ca_cert_label_); 619 layout_->AddView(server_ca_cert_label_);
607 server_ca_cert_combobox_model_.reset( 620 server_ca_cert_combobox_model_.reset(
608 new internal::VpnServerCACertComboboxModel()); 621 new internal::VpnServerCACertComboboxModel());
609 server_ca_cert_combobox_ = new views::Combobox( 622 server_ca_cert_combobox_ = new views::Combobox(
610 server_ca_cert_combobox_model_.get()); 623 server_ca_cert_combobox_model_.get());
611 layout_->AddView(server_ca_cert_combobox_); 624 layout_->AddView(server_ca_cert_combobox_);
612 layout_->AddView(new ControlledSettingIndicatorView(ca_cert_ui_data_)); 625 layout_->AddView(new ControlledSettingIndicatorView(ca_cert_ui_data_));
613 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 626 layout_->AddPaddingRow(
627 0, delegate->GetMetric(
628 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
614 } else { 629 } else {
615 server_ca_cert_label_ = NULL; 630 server_ca_cert_label_ = NULL;
616 server_ca_cert_combobox_ = NULL; 631 server_ca_cert_combobox_ = NULL;
617 } 632 }
618 633
619 // User certificate label and input. 634 // User certificate label and input.
620 layout_->StartRow(0, 0); 635 layout_->StartRow(0, 0);
621 user_cert_label_ = new views::Label(l10n_util::GetStringUTF16( 636 user_cert_label_ = new views::Label(l10n_util::GetStringUTF16(
622 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USER_CERT)); 637 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USER_CERT));
623 layout_->AddView(user_cert_label_); 638 layout_->AddView(user_cert_label_);
624 user_cert_combobox_model_.reset( 639 user_cert_combobox_model_.reset(
625 new internal::VpnUserCertComboboxModel()); 640 new internal::VpnUserCertComboboxModel());
626 user_cert_combobox_ = new views::Combobox(user_cert_combobox_model_.get()); 641 user_cert_combobox_ = new views::Combobox(user_cert_combobox_model_.get());
627 user_cert_combobox_->set_listener(this); 642 user_cert_combobox_->set_listener(this);
628 layout_->AddView(user_cert_combobox_); 643 layout_->AddView(user_cert_combobox_);
629 layout_->AddView(new ControlledSettingIndicatorView(user_cert_ui_data_)); 644 layout_->AddView(new ControlledSettingIndicatorView(user_cert_ui_data_));
630 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 645 layout_->AddPaddingRow(
646 0, delegate->GetMetric(
647 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
631 648
632 // Username label and input. 649 // Username label and input.
633 layout_->StartRow(0, 0); 650 layout_->StartRow(0, 0);
634 layout_->AddView(new views::Label(l10n_util::GetStringUTF16( 651 layout_->AddView(new views::Label(l10n_util::GetStringUTF16(
635 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USERNAME))); 652 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USERNAME)));
636 username_textfield_ = new views::Textfield(); 653 username_textfield_ = new views::Textfield();
637 username_textfield_->set_controller(this); 654 username_textfield_->set_controller(this);
638 username_textfield_->SetEnabled(username_ui_data_.IsEditable()); 655 username_textfield_->SetEnabled(username_ui_data_.IsEditable());
639 layout_->AddView(username_textfield_); 656 layout_->AddView(username_textfield_);
640 layout_->AddView(new ControlledSettingIndicatorView(username_ui_data_)); 657 layout_->AddView(new ControlledSettingIndicatorView(username_ui_data_));
641 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 658 layout_->AddPaddingRow(
659 0, delegate->GetMetric(
660 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
642 661
643 // User passphrase label, input and visble button. 662 // User passphrase label, input and visble button.
644 layout_->StartRow(0, 0); 663 layout_->StartRow(0, 0);
645 layout_->AddView(new views::Label(l10n_util::GetStringUTF16( 664 layout_->AddView(new views::Label(l10n_util::GetStringUTF16(
646 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USER_PASSPHRASE))); 665 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USER_PASSPHRASE)));
647 user_passphrase_textfield_ = new PassphraseTextfield(); 666 user_passphrase_textfield_ = new PassphraseTextfield();
648 user_passphrase_textfield_->set_controller(this); 667 user_passphrase_textfield_->set_controller(this);
649 user_passphrase_textfield_->SetEnabled(user_passphrase_ui_data_.IsEditable()); 668 user_passphrase_textfield_->SetEnabled(user_passphrase_ui_data_.IsEditable());
650 layout_->AddView(user_passphrase_textfield_); 669 layout_->AddView(user_passphrase_textfield_);
651 layout_->AddView( 670 layout_->AddView(
652 new ControlledSettingIndicatorView(user_passphrase_ui_data_)); 671 new ControlledSettingIndicatorView(user_passphrase_ui_data_));
653 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 672 layout_->AddPaddingRow(
673 0, delegate->GetMetric(
674 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
654 675
655 // OTP label and input. 676 // OTP label and input.
656 layout_->StartRow(0, 0); 677 layout_->StartRow(0, 0);
657 otp_label_ = new views::Label(l10n_util::GetStringUTF16( 678 otp_label_ = new views::Label(l10n_util::GetStringUTF16(
658 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_OTP)); 679 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_OTP));
659 layout_->AddView(otp_label_); 680 layout_->AddView(otp_label_);
660 otp_textfield_ = new views::Textfield(); 681 otp_textfield_ = new views::Textfield();
661 otp_textfield_->set_controller(this); 682 otp_textfield_->set_controller(this);
662 layout_->AddView(otp_textfield_); 683 layout_->AddView(otp_textfield_);
663 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 684 layout_->AddPaddingRow(
685 0, delegate->GetMetric(
686 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
664 687
665 // Group Name label and input. 688 // Group Name label and input.
666 layout_->StartRow(0, 0); 689 layout_->StartRow(0, 0);
667 group_name_label_ = new views::Label(l10n_util::GetStringUTF16( 690 group_name_label_ = new views::Label(l10n_util::GetStringUTF16(
668 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_GROUP_NAME)); 691 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_GROUP_NAME));
669 layout_->AddView(group_name_label_); 692 layout_->AddView(group_name_label_);
670 group_name_textfield_ = 693 group_name_textfield_ =
671 new views::Textfield(); 694 new views::Textfield();
672 group_name_textfield_->set_controller(this); 695 group_name_textfield_->set_controller(this);
673 layout_->AddView(group_name_textfield_); 696 layout_->AddView(group_name_textfield_);
674 layout_->AddView(new ControlledSettingIndicatorView(group_name_ui_data_)); 697 layout_->AddView(new ControlledSettingIndicatorView(group_name_ui_data_));
675 layout_->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 698 layout_->AddPaddingRow(
699 0, delegate->GetMetric(
700 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
676 701
677 // Save credentials 702 // Save credentials
678 layout_->StartRow(0, 0); 703 layout_->StartRow(0, 0);
679 save_credentials_checkbox_ = new views::Checkbox( 704 save_credentials_checkbox_ = new views::Checkbox(
680 l10n_util::GetStringUTF16( 705 l10n_util::GetStringUTF16(
681 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SAVE_CREDENTIALS)); 706 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SAVE_CREDENTIALS));
682 save_credentials_checkbox_->SetEnabled( 707 save_credentials_checkbox_->SetEnabled(
683 save_credentials_ui_data_.IsEditable()); 708 save_credentials_ui_data_.IsEditable());
684 layout_->SkipColumns(1); 709 layout_->SkipColumns(1);
685 layout_->AddView(save_credentials_checkbox_); 710 layout_->AddView(save_credentials_checkbox_);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 property_ui_data->ParseOncProperty( 1094 property_ui_data->ParseOncProperty(
1070 onc_source, 1095 onc_source,
1071 onc, 1096 onc,
1072 base::StringPrintf("%s.%s.%s", 1097 base::StringPrintf("%s.%s.%s",
1073 ::onc::network_config::kVPN, 1098 ::onc::network_config::kVPN,
1074 dict_key.c_str(), 1099 dict_key.c_str(),
1075 key.c_str())); 1100 key.c_str()));
1076 } 1101 }
1077 1102
1078 } // namespace chromeos 1103 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/wimax_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698