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 "ash/system/chromeos/network/network_connect.h" | 7 #include "ash/system/chromeos/network/network_connect.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 11 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
12 #include "chrome/browser/chromeos/options/network_connect.h" | 12 #include "chrome/browser/chromeos/net/onc_utils.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/common/net/x509_certificate_model.h" | 14 #include "chrome/common/net/x509_certificate_model.h" |
15 #include "chromeos/network/network_configuration_handler.h" | 15 #include "chromeos/network/network_configuration_handler.h" |
16 #include "chromeos/network/network_event_log.h" | 16 #include "chromeos/network/network_event_log.h" |
17 #include "chromeos/network/network_state.h" | 17 #include "chromeos/network/network_state.h" |
18 #include "chromeos/network/network_state_handler.h" | 18 #include "chromeos/network/network_state_handler.h" |
19 #include "chromeos/network/network_ui_data.h" | 19 #include "chromeos/network/network_ui_data.h" |
20 #include "chromeos/network/onc/onc_constants.h" | 20 #include "chromeos/network/onc/onc_constants.h" |
21 #include "grit/chromium_strings.h" | 21 #include "grit/chromium_strings.h" |
22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 return textfield->GetPassphrase(); | 1036 return textfield->GetPassphrase(); |
1037 } | 1037 } |
1038 | 1038 |
1039 void VPNConfigView::ParseVPNUIProperty( | 1039 void VPNConfigView::ParseVPNUIProperty( |
1040 const NetworkState* network, | 1040 const NetworkState* network, |
1041 const std::string& dict_key, | 1041 const std::string& dict_key, |
1042 const std::string& key, | 1042 const std::string& key, |
1043 NetworkPropertyUIData* property_ui_data) { | 1043 NetworkPropertyUIData* property_ui_data) { |
1044 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; | 1044 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; |
1045 const base::DictionaryValue* onc = | 1045 const base::DictionaryValue* onc = |
1046 network_connect::FindPolicyForActiveUser(network, &onc_source); | 1046 onc::FindPolicyForActiveUser(network->guid(), &onc_source); |
1047 | 1047 |
1048 VLOG_IF(1, !onc) << "No ONC found for VPN network " << network->guid(); | 1048 VLOG_IF(1, !onc) << "No ONC found for VPN network " << network->guid(); |
1049 property_ui_data->ParseOncProperty( | 1049 property_ui_data->ParseOncProperty( |
1050 onc_source, | 1050 onc_source, |
1051 onc, | 1051 onc, |
1052 base::StringPrintf("%s.%s.%s", | 1052 base::StringPrintf("%s.%s.%s", |
1053 onc::network_config::kVPN, | 1053 onc::network_config::kVPN, |
1054 dict_key.c_str(), | 1054 dict_key.c_str(), |
1055 key.c_str())); | 1055 key.c_str())); |
1056 } | 1056 } |
1057 | 1057 |
1058 } // namespace chromeos | 1058 } // namespace chromeos |
OLD | NEW |