| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 29 matching lines...) Expand all Loading... |
| 40 : consumer_(consumer), | 40 : consumer_(consumer), |
| 41 getter_(getter), | 41 getter_(getter), |
| 42 profile_(profile), | 42 profile_(profile), |
| 43 popup_(NULL), | 43 popup_(NULL), |
| 44 service_scope_(service_scope), | 44 service_scope_(service_scope), |
| 45 fetch_pending_(false), | 45 fetch_pending_(false), |
| 46 auto_fetch_limit_(ALL_OAUTH_STEPS) {} | 46 auto_fetch_limit_(ALL_OAUTH_STEPS) {} |
| 47 | 47 |
| 48 GaiaOAuthFetcher::~GaiaOAuthFetcher() {} | 48 GaiaOAuthFetcher::~GaiaOAuthFetcher() {} |
| 49 | 49 |
| 50 bool GaiaOAuthFetcher::HasPendingFetch() { | 50 bool GaiaOAuthFetcher::HasPendingFetch() const { |
| 51 return fetch_pending_; | 51 return fetch_pending_; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void GaiaOAuthFetcher::CancelRequest() { | 54 void GaiaOAuthFetcher::CancelRequest() { |
| 55 fetcher_.reset(); | 55 fetcher_.reset(); |
| 56 fetch_pending_ = false; | 56 fetch_pending_ = false; |
| 57 } | 57 } |
| 58 | 58 |
| 59 // static | 59 // static |
| 60 content::URLFetcher* GaiaOAuthFetcher::CreateGaiaFetcher( | 60 content::URLFetcher* GaiaOAuthFetcher::CreateGaiaFetcher( |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 true)) { | 679 true)) { |
| 680 OnOAuthRevokeTokenFetched(data, status, response_code); | 680 OnOAuthRevokeTokenFetched(data, status, response_code); |
| 681 } else { | 681 } else { |
| 682 NOTREACHED(); | 682 NOTREACHED(); |
| 683 } | 683 } |
| 684 } | 684 } |
| 685 | 685 |
| 686 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { | 686 bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { |
| 687 return fetch_step <= auto_fetch_limit_; | 687 return fetch_step <= auto_fetch_limit_; |
| 688 } | 688 } |
| OLD | NEW |