| 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 "chrome/browser/net/gaia/gaia_oauth_fetcher.h" | 5 #include "chrome/browser/net/gaia/gaia_oauth_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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 OnOAuthGetAccessTokenFetched(data, status, response_code); | 678 OnOAuthGetAccessTokenFetched(data, status, response_code); |
| 679 } else if (url.spec() == gaia_urls->oauth_wrap_bridge_url()) { | 679 } else if (url.spec() == gaia_urls->oauth_wrap_bridge_url()) { |
| 680 OnOAuthWrapBridgeFetched(data, status, response_code); | 680 OnOAuthWrapBridgeFetched(data, status, response_code); |
| 681 } else if (url.spec() == gaia_urls->oauth_user_info_url()) { | 681 } else if (url.spec() == gaia_urls->oauth_user_info_url()) { |
| 682 OnUserInfoFetched(data, status, response_code); | 682 OnUserInfoFetched(data, status, response_code); |
| 683 } else if (StartsWithASCII(url.spec(), | 683 } else if (StartsWithASCII(url.spec(), |
| 684 gaia_urls->oauth_revoke_token_url(), | 684 gaia_urls->oauth_revoke_token_url(), |
| 685 true)) { | 685 true)) { |
| 686 OnOAuthRevokeTokenFetched(data, status, response_code); | 686 OnOAuthRevokeTokenFetched(data, status, response_code); |
| 687 } else { | 687 } else { |
| 688 LOG(ERROR) << __FUNCTION__ << " " << url.spec(); |
| 688 NOTREACHED(); | 689 NOTREACHED(); |
| 689 } | 690 } |
| 690 } | 691 } |
| 691 | 692 |
| 692 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { | 693 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { |
| 693 return fetch_step <= auto_fetch_limit_; | 694 return fetch_step <= auto_fetch_limit_; |
| 694 } | 695 } |
| OLD | NEW |