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

Side by Side Diff: chrome/browser/chromeos/login/user.cc

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/user.h ('k') | chrome/browser/chromeos/login/user_manager.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/login/user.h" 5 #include "chrome/browser/chromeos/login/user.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 bool UserContext::operator==(const UserContext& context) const { 145 bool UserContext::operator==(const UserContext& context) const {
146 return context.username == username && 146 return context.username == username &&
147 context.password == password && 147 context.password == password &&
148 context.auth_code == auth_code && 148 context.auth_code == auth_code &&
149 context.username_hash == username_hash && 149 context.username_hash == username_hash &&
150 context.using_oauth == using_oauth; 150 context.using_oauth == using_oauth;
151 } 151 }
152 152
153 string16 User::GetDisplayName() const { 153 base::string16 User::GetDisplayName() const {
154 // Fallback to the email account name in case display name haven't been set. 154 // Fallback to the email account name in case display name haven't been set.
155 return display_name_.empty() ? 155 return display_name_.empty() ?
156 UTF8ToUTF16(GetAccountName(true)) : 156 UTF8ToUTF16(GetAccountName(true)) :
157 display_name_; 157 display_name_;
158 } 158 }
159 159
160 std::string User::GetAccountName(bool use_display_email) const { 160 std::string User::GetAccountName(bool use_display_email) const {
161 if (use_display_email && !display_email_.empty()) 161 if (use_display_email && !display_email_.empty())
162 return GetUserName(display_email_); 162 return GetUserName(display_email_);
163 else 163 else
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 case USER_TYPE_LOCALLY_MANAGED: 341 case USER_TYPE_LOCALLY_MANAGED:
342 case USER_TYPE_KIOSK_APP: 342 case USER_TYPE_KIOSK_APP:
343 return false; 343 return false;
344 default: 344 default:
345 NOTREACHED(); 345 NOTREACHED();
346 } 346 }
347 return false; 347 return false;
348 } 348 }
349 349
350 } // namespace chromeos 350 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user.h ('k') | chrome/browser/chromeos/login/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698