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

Side by Side Diff: chrome/common/net/gaia/gaia_authenticator2.cc

Issue 3024002: Add IssueAuthToken support to the TokenService. (Closed)
Patch Set: Code review fixes Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/common/net/gaia/gaia_authenticator2.h" 5 #include "chrome/common/net/gaia/gaia_authenticator2.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 28 matching lines...) Expand all
39 "SID=%s&" 39 "SID=%s&"
40 "LSID=%s&" 40 "LSID=%s&"
41 "service=%s&" 41 "service=%s&"
42 "Session=true"; 42 "Session=true";
43 43
44 // static 44 // static
45 const char GaiaAuthenticator2::kCookiePersistence[] = "true"; 45 const char GaiaAuthenticator2::kCookiePersistence[] = "true";
46 // static 46 // static
47 const char GaiaAuthenticator2::kAccountType[] = "HOSTED_OR_GOOGLE"; 47 const char GaiaAuthenticator2::kAccountType[] = "HOSTED_OR_GOOGLE";
48 // static 48 // static
49 const char GaiaAuthenticator2::kChromeOSSource[] = "chromeos";
50 // static
51 // Service name for Gaia Contacts API. API is used to get user's image.
52 const char GaiaAuthenticator2::kContactsService[] = "cp";
53 // static
54 const char GaiaAuthenticator2::kSecondFactor[] = "Info=InvalidSecondFactor"; 49 const char GaiaAuthenticator2::kSecondFactor[] = "Info=InvalidSecondFactor";
55 50
56 // TODO(chron): These urls are also in auth_response_handler.h. 51 // TODO(chron): These urls are also in auth_response_handler.h.
57 // The URLs for different calls in the Google Accounts programmatic login API. 52 // The URLs for different calls in the Google Accounts programmatic login API.
58 const char GaiaAuthenticator2::kClientLoginUrl[] = 53 const char GaiaAuthenticator2::kClientLoginUrl[] =
59 "https://www.google.com/accounts/ClientLogin"; 54 "https://www.google.com/accounts/ClientLogin";
60 const char GaiaAuthenticator2::kIssueAuthTokenUrl[] = 55 const char GaiaAuthenticator2::kIssueAuthTokenUrl[] =
61 "https://www.google.com/accounts/IssueAuthToken"; 56 "https://www.google.com/accounts/IssueAuthToken";
62 57
63 GaiaAuthenticator2::GaiaAuthenticator2(GaiaAuthConsumer* consumer, 58 GaiaAuthenticator2::GaiaAuthenticator2(GaiaAuthConsumer* consumer,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 NOTREACHED(); 278 NOTREACHED();
284 } 279 }
285 } 280 }
286 281
287 // static 282 // static
288 bool GaiaAuthenticator2::IsSecondFactorSuccess( 283 bool GaiaAuthenticator2::IsSecondFactorSuccess(
289 const std::string& alleged_error) { 284 const std::string& alleged_error) {
290 return alleged_error.find(kSecondFactor) != 285 return alleged_error.find(kSecondFactor) !=
291 std::string::npos; 286 std::string::npos;
292 } 287 }
OLDNEW
« no previous file with comments | « chrome/common/net/gaia/gaia_authenticator2.h ('k') | chrome/common/net/gaia/gaia_authenticator2_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698