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

Side by Side Diff: chrome/browser/chromeos/cros/onc_network_parser.cc

Issue 10541036: Show account part of the display email when real name is not available. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comments Created 8 years, 6 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/login/user.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698