| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/oauth2_token_service.h" | 5 #include "google_apis/gaia/oauth2_token_service.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 OAuth2TokenService::Consumer::~Consumer() { | 391 OAuth2TokenService::Consumer::~Consumer() { |
| 392 } | 392 } |
| 393 | 393 |
| 394 OAuth2TokenService::OAuth2TokenService(OAuth2TokenServiceDelegate* delegate) | 394 OAuth2TokenService::OAuth2TokenService(OAuth2TokenServiceDelegate* delegate) |
| 395 : delegate_(delegate) { | 395 : delegate_(delegate) { |
| 396 DCHECK(delegate_); | 396 DCHECK(delegate_); |
| 397 } | 397 } |
| 398 | 398 |
| 399 OAuth2TokenService::~OAuth2TokenService() { | 399 OAuth2TokenService::~OAuth2TokenService() { |
| 400 // Release all the pending fetchers. | 400 // Release all the pending fetchers. |
| 401 STLDeleteContainerPairSecondPointers( | 401 base::STLDeleteContainerPairSecondPointers(pending_fetchers_.begin(), |
| 402 pending_fetchers_.begin(), pending_fetchers_.end()); | 402 pending_fetchers_.end()); |
| 403 } | 403 } |
| 404 | 404 |
| 405 OAuth2TokenServiceDelegate* OAuth2TokenService::GetDelegate() { | 405 OAuth2TokenServiceDelegate* OAuth2TokenService::GetDelegate() { |
| 406 return delegate_.get(); | 406 return delegate_.get(); |
| 407 } | 407 } |
| 408 | 408 |
| 409 void OAuth2TokenService::AddObserver(Observer* observer) { | 409 void OAuth2TokenService::AddObserver(Observer* observer) { |
| 410 delegate_->AddObserver(observer); | 410 delegate_->AddObserver(observer); |
| 411 } | 411 } |
| 412 | 412 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 const std::string& account_id, | 827 const std::string& account_id, |
| 828 const ScopeSet& scopes) const { | 828 const ScopeSet& scopes) const { |
| 829 PendingFetcherMap::const_iterator iter = pending_fetchers_.find( | 829 PendingFetcherMap::const_iterator iter = pending_fetchers_.find( |
| 830 OAuth2TokenService::RequestParameters( | 830 OAuth2TokenService::RequestParameters( |
| 831 client_id, | 831 client_id, |
| 832 account_id, | 832 account_id, |
| 833 scopes)); | 833 scopes)); |
| 834 return iter == pending_fetchers_.end() ? | 834 return iter == pending_fetchers_.end() ? |
| 835 0 : iter->second->GetWaitingRequestCount(); | 835 0 : iter->second->GetWaitingRequestCount(); |
| 836 } | 836 } |
| OLD | NEW |