| OLD | NEW |
| 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 "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 11 #include "chrome/browser/chromeos/cros/network_library.h" |
| 11 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 12 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/common/net/x509_certificate_model.h" | 14 #include "chrome/common/net/x509_certificate_model.h" |
| 15 #include "chromeos/network/network_ui_data.h" |
| 14 #include "chromeos/network/onc/onc_constants.h" | 16 #include "chromeos/network/onc/onc_constants.h" |
| 15 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
| 16 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 17 #include "grit/locale_settings.h" | 19 #include "grit/locale_settings.h" |
| 18 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 19 #include "ui/base/events/event.h" | 21 #include "ui/base/events/event.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "ui/base/models/combobox_model.h" | 23 #include "ui/base/models/combobox_model.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/views/controls/button/checkbox.h" | 25 #include "ui/views/controls/button/checkbox.h" |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 void VPNConfigView::ParseVPNUIProperty(NetworkPropertyUIData* property_ui_data, | 892 void VPNConfigView::ParseVPNUIProperty(NetworkPropertyUIData* property_ui_data, |
| 891 Network* network, | 893 Network* network, |
| 892 const std::string& dict_key, | 894 const std::string& dict_key, |
| 893 const std::string& key) { | 895 const std::string& key) { |
| 894 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); | 896 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); |
| 895 const base::DictionaryValue* onc = | 897 const base::DictionaryValue* onc = |
| 896 network_library->FindOncForNetwork(network->unique_id()); | 898 network_library->FindOncForNetwork(network->unique_id()); |
| 897 VLOG_IF(1, !onc) << "No ONC found for VPN network " << network->unique_id(); | 899 VLOG_IF(1, !onc) << "No ONC found for VPN network " << network->unique_id(); |
| 898 | 900 |
| 899 property_ui_data->ParseOncProperty( | 901 property_ui_data->ParseOncProperty( |
| 900 network->ui_data(), onc, | 902 network->ui_data().onc_source(), onc, |
| 901 base::StringPrintf("%s.%s.%s", | 903 base::StringPrintf("%s.%s.%s", |
| 902 onc::network_config::kVPN, | 904 onc::network_config::kVPN, |
| 903 dict_key.c_str(), | 905 dict_key.c_str(), |
| 904 key.c_str())); | 906 key.c_str())); |
| 905 } | 907 } |
| 906 | 908 |
| 907 } // namespace chromeos | 909 } // namespace chromeos |
| OLD | NEW |