| 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 NOTREACHED(); | 936 NOTREACHED(); |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 | 939 |
| 940 // static | 940 // static |
| 941 bool GaiaAuthFetcher::IsSecondFactorSuccess( | 941 bool GaiaAuthFetcher::IsSecondFactorSuccess( |
| 942 const std::string& alleged_error) { | 942 const std::string& alleged_error) { |
| 943 return alleged_error.find(kSecondFactor) != | 943 return alleged_error.find(kSecondFactor) != |
| 944 std::string::npos; | 944 std::string::npos; |
| 945 } | 945 } |
| OLD | NEW |