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

Side by Side Diff: google_apis/gaia/gaia_auth_util.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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 | « google_apis/gaia/fake_gaia.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('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 "google_apis/gaia/gaia_auth_util.h" 5 #include "google_apis/gaia/gaia_auth_util.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 18 matching lines...) Expand all
29 << (parts.empty() ? 0 : parts.size() - 1) 29 << (parts.empty() ? 0 : parts.size() - 1)
30 << " : " << email_address; 30 << " : " << email_address;
31 } else { 31 } else {
32 if (change_googlemail_to_gmail && parts[1] == kGooglemailDomain) 32 if (change_googlemail_to_gmail && parts[1] == kGooglemailDomain)
33 parts[1] = kGmailDomain; 33 parts[1] = kGmailDomain;
34 34
35 if (parts[1] == kGmailDomain) // only strip '.' for gmail accounts. 35 if (parts[1] == kGmailDomain) // only strip '.' for gmail accounts.
36 base::RemoveChars(parts[0], ".", &parts[0]); 36 base::RemoveChars(parts[0], ".", &parts[0]);
37 } 37 }
38 38
39 std::string new_email = base::StringToLowerASCII(JoinString(parts, at)); 39 std::string new_email = base::StringToLowerASCII(
40 base::JoinString(parts, "@"));
40 VLOG(1) << "Canonicalized " << email_address << " to " << new_email; 41 VLOG(1) << "Canonicalized " << email_address << " to " << new_email;
41 return new_email; 42 return new_email;
42 } 43 }
43 44
44 } // namespace 45 } // namespace
45 46
46 47
47 ListedAccount::ListedAccount() {} 48 ListedAccount::ListedAccount() {}
48 49
49 ListedAccount::~ListedAccount() {} 50 ListedAccount::~ListedAccount() {}
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 accounts->push_back(listed_account); 157 accounts->push_back(listed_account);
157 } 158 }
158 } 159 }
159 } 160 }
160 } 161 }
161 162
162 return true; 163 return true;
163 } 164 }
164 165
165 } // namespace gaia 166 } // namespace gaia
OLDNEW
« no previous file with comments | « google_apis/gaia/fake_gaia.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698