| 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/bind.h" | 7 #include "base/bind.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" |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 } else if (!IsUserCertValid()) { | 993 } else if (!IsUserCertValid()) { |
| 994 error_msg = l10n_util::GetStringUTF16( | 994 error_msg = l10n_util::GetStringUTF16( |
| 995 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_REQUIRE_HARDWARE_BACKED); | 995 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_REQUIRE_HARDWARE_BACKED); |
| 996 } | 996 } |
| 997 } | 997 } |
| 998 if (error_msg.empty() && !service_path_.empty()) { | 998 if (error_msg.empty() && !service_path_.empty()) { |
| 999 // TODO(kuan): differentiate between bad psk and user passphrases. | 999 // TODO(kuan): differentiate between bad psk and user passphrases. |
| 1000 const NetworkState* vpn = NetworkHandler::Get()->network_state_handler()-> | 1000 const NetworkState* vpn = NetworkHandler::Get()->network_state_handler()-> |
| 1001 GetNetworkState(service_path_); | 1001 GetNetworkState(service_path_); |
| 1002 if (vpn && vpn->connection_state() == shill::kStateFailure) | 1002 if (vpn && vpn->connection_state() == shill::kStateFailure) |
| 1003 error_msg = ui::NetworkConnect::Get()->GetErrorString( | 1003 error_msg = ui::NetworkConnect::Get()->GetShillErrorString( |
| 1004 vpn->last_error(), vpn->path()); | 1004 vpn->last_error(), vpn->path()); |
| 1005 } | 1005 } |
| 1006 if (!error_msg.empty()) { | 1006 if (!error_msg.empty()) { |
| 1007 error_label_->SetText(error_msg); | 1007 error_label_->SetText(error_msg); |
| 1008 error_label_->SetVisible(true); | 1008 error_label_->SetVisible(true); |
| 1009 } else { | 1009 } else { |
| 1010 error_label_->SetVisible(false); | 1010 error_label_->SetVisible(false); |
| 1011 } | 1011 } |
| 1012 } | 1012 } |
| 1013 | 1013 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 property_ui_data->ParseOncProperty( | 1065 property_ui_data->ParseOncProperty( |
| 1066 onc_source, | 1066 onc_source, |
| 1067 onc, | 1067 onc, |
| 1068 base::StringPrintf("%s.%s.%s", | 1068 base::StringPrintf("%s.%s.%s", |
| 1069 ::onc::network_config::kVPN, | 1069 ::onc::network_config::kVPN, |
| 1070 dict_key.c_str(), | 1070 dict_key.c_str(), |
| 1071 key.c_str())); | 1071 key.c_str())); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 } // namespace chromeos | 1074 } // namespace chromeos |
| OLD | NEW |