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/cros/onc_network_parser.h" | 5 #include "chrome/browser/chromeos/cros/onc_network_parser.h" |
6 | 6 |
7 #include <keyhi.h> | 7 #include <keyhi.h> |
8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 source != NetworkUIData::ONC_SOURCE_USER_IMPORT) { | 677 source != NetworkUIData::ONC_SOURCE_USER_IMPORT) { |
678 return string_value; | 678 return string_value; |
679 } | 679 } |
680 | 680 |
681 if (!UserManager::Get()->IsUserLoggedIn()) | 681 if (!UserManager::Get()->IsUserLoggedIn()) |
682 return string_value; | 682 return string_value; |
683 | 683 |
684 const User& logged_in_user(UserManager::Get()->GetLoggedInUser()); | 684 const User& logged_in_user(UserManager::Get()->GetLoggedInUser()); |
685 ReplaceSubstringsAfterOffset(&string_value, 0, | 685 ReplaceSubstringsAfterOffset(&string_value, 0, |
686 onc::substitutes::kLoginIDField, | 686 onc::substitutes::kLoginIDField, |
687 logged_in_user.GetAccountName()); | 687 logged_in_user.GetAccountName(false)); |
688 ReplaceSubstringsAfterOffset(&string_value, 0, | 688 ReplaceSubstringsAfterOffset(&string_value, 0, |
689 onc::substitutes::kEmailField, | 689 onc::substitutes::kEmailField, |
690 logged_in_user.email()); | 690 logged_in_user.email()); |
691 return string_value; | 691 return string_value; |
692 } | 692 } |
693 | 693 |
694 Network* OncNetworkParser::CreateNewNetwork( | 694 Network* OncNetworkParser::CreateNewNetwork( |
695 ConnectionType type, const std::string& service_path) { | 695 ConnectionType type, const std::string& service_path) { |
696 Network* network = NetworkParser::CreateNewNetwork(type, service_path); | 696 Network* network = NetworkParser::CreateNewNetwork(type, service_path); |
697 if (network) { | 697 if (network) { |
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 // on the value of AuthenticationType. | 1990 // on the value of AuthenticationType. |
1991 { "L2TP-IPsec", PROVIDER_TYPE_L2TP_IPSEC_PSK }, | 1991 { "L2TP-IPsec", PROVIDER_TYPE_L2TP_IPSEC_PSK }, |
1992 { "OpenVPN", PROVIDER_TYPE_OPEN_VPN }, | 1992 { "OpenVPN", PROVIDER_TYPE_OPEN_VPN }, |
1993 }; | 1993 }; |
1994 CR_DEFINE_STATIC_LOCAL(EnumMapper<ProviderType>, parser, | 1994 CR_DEFINE_STATIC_LOCAL(EnumMapper<ProviderType>, parser, |
1995 (table, arraysize(table), PROVIDER_TYPE_MAX)); | 1995 (table, arraysize(table), PROVIDER_TYPE_MAX)); |
1996 return parser.Get(type); | 1996 return parser.Get(type); |
1997 } | 1997 } |
1998 | 1998 |
1999 } // namespace chromeos | 1999 } // namespace chromeos |
OLD | NEW |