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 "google_apis/gaia/gaia_auth_fetcher.h" | 5 #include "google_apis/gaia/gaia_auth_fetcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "net/url_request/url_request_status.h" | 27 #include "net/url_request/url_request_status.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 const int kLoadFlagsIgnoreCookies = net::LOAD_DO_NOT_SEND_COOKIES | | 30 const int kLoadFlagsIgnoreCookies = net::LOAD_DO_NOT_SEND_COOKIES | |
31 net::LOAD_DO_NOT_SAVE_COOKIES; | 31 net::LOAD_DO_NOT_SAVE_COOKIES; |
32 | 32 |
33 static bool CookiePartsContains(const std::vector<std::string>& parts, | 33 static bool CookiePartsContains(const std::vector<std::string>& parts, |
34 const char* part) { | 34 const char* part) { |
35 for (std::vector<std::string>::const_iterator it = parts.begin(); | 35 for (std::vector<std::string>::const_iterator it = parts.begin(); |
36 it != parts.end(); ++it) { | 36 it != parts.end(); ++it) { |
37 if (LowerCaseEqualsASCII(*it, part)) | 37 if (base::LowerCaseEqualsASCII(*it, part)) |
38 return true; | 38 return true; |
39 } | 39 } |
40 return false; | 40 return false; |
41 } | 41 } |
42 | 42 |
43 bool ExtractOAuth2TokenPairResponse(base::DictionaryValue* dict, | 43 bool ExtractOAuth2TokenPairResponse(base::DictionaryValue* dict, |
44 std::string* refresh_token, | 44 std::string* refresh_token, |
45 std::string* access_token, | 45 std::string* access_token, |
46 int* expires_in_secs) { | 46 int* expires_in_secs) { |
47 DCHECK(refresh_token); | 47 DCHECK(refresh_token); |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 NOTREACHED(); | 930 NOTREACHED(); |
931 } | 931 } |
932 } | 932 } |
933 | 933 |
934 // static | 934 // static |
935 bool GaiaAuthFetcher::IsSecondFactorSuccess( | 935 bool GaiaAuthFetcher::IsSecondFactorSuccess( |
936 const std::string& alleged_error) { | 936 const std::string& alleged_error) { |
937 return alleged_error.find(kSecondFactor) != | 937 return alleged_error.find(kSecondFactor) != |
938 std::string::npos; | 938 std::string::npos; |
939 } | 939 } |
OLD | NEW |