| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 (*iter)->Cancel(); | 708 (*iter)->Cancel(); |
| 709 } | 709 } |
| 710 } | 710 } |
| 711 | 711 |
| 712 void OAuth2TokenService::FireRefreshTokenAvailable( | 712 void OAuth2TokenService::FireRefreshTokenAvailable( |
| 713 const std::string& account_id) { | 713 const std::string& account_id) { |
| 714 FOR_EACH_OBSERVER(Observer, observer_list_, | 714 FOR_EACH_OBSERVER(Observer, observer_list_, |
| 715 OnRefreshTokenAvailable(account_id)); | 715 OnRefreshTokenAvailable(account_id)); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void OAuth2TokenService::FireRefreshTokenAvailable( |
| 719 const std::deque<std::string>& account_ids) { |
| 720 FOR_EACH_OBSERVER(Observer, observer_list_, |
| 721 OnRefreshTokenAvailable(account_ids)); |
| 722 } |
| 723 |
| 718 void OAuth2TokenService::FireRefreshTokenRevoked( | 724 void OAuth2TokenService::FireRefreshTokenRevoked( |
| 719 const std::string& account_id) { | 725 const std::string& account_id) { |
| 720 FOR_EACH_OBSERVER(Observer, observer_list_, | 726 FOR_EACH_OBSERVER(Observer, observer_list_, |
| 721 OnRefreshTokenRevoked(account_id)); | 727 OnRefreshTokenRevoked(account_id)); |
| 722 } | 728 } |
| 723 | 729 |
| 724 void OAuth2TokenService::FireRefreshTokensLoaded() { | 730 void OAuth2TokenService::FireRefreshTokensLoaded() { |
| 725 FOR_EACH_OBSERVER(Observer, observer_list_, OnRefreshTokensLoaded()); | 731 FOR_EACH_OBSERVER(Observer, observer_list_, OnRefreshTokensLoaded()); |
| 726 } | 732 } |
| 727 | 733 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 740 const std::string& account_id, | 746 const std::string& account_id, |
| 741 const ScopeSet& scopes) const { | 747 const ScopeSet& scopes) const { |
| 742 PendingFetcherMap::const_iterator iter = pending_fetchers_.find( | 748 PendingFetcherMap::const_iterator iter = pending_fetchers_.find( |
| 743 OAuth2TokenService::RequestParameters( | 749 OAuth2TokenService::RequestParameters( |
| 744 client_id, | 750 client_id, |
| 745 account_id, | 751 account_id, |
| 746 scopes)); | 752 scopes)); |
| 747 return iter == pending_fetchers_.end() ? | 753 return iter == pending_fetchers_.end() ? |
| 748 0 : iter->second->GetWaitingRequestCount(); | 754 0 : iter->second->GetWaitingRequestCount(); |
| 749 } | 755 } |
| OLD | NEW |