Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: google_apis/gaia/oauth2_token_service.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // this Fetcher is destructed in the dtor of the OAuth2TokenService or is 165 // this Fetcher is destructed in the dtor of the OAuth2TokenService or is
166 // scheduled for deletion at the end of OnGetTokenFailure/OnGetTokenSuccess 166 // scheduled for deletion at the end of OnGetTokenFailure/OnGetTokenSuccess
167 // (whichever comes first). 167 // (whichever comes first).
168 OAuth2TokenService* const oauth2_token_service_; 168 OAuth2TokenService* const oauth2_token_service_;
169 scoped_refptr<net::URLRequestContextGetter> getter_; 169 scoped_refptr<net::URLRequestContextGetter> getter_;
170 const std::string account_id_; 170 const std::string account_id_;
171 const ScopeSet scopes_; 171 const ScopeSet scopes_;
172 std::vector<base::WeakPtr<RequestImpl> > waiting_requests_; 172 std::vector<base::WeakPtr<RequestImpl> > waiting_requests_;
173 173
174 int retry_number_; 174 int retry_number_;
175 base::OneShotTimer<Fetcher> retry_timer_; 175 base::OneShotTimer retry_timer_;
176 scoped_ptr<OAuth2AccessTokenFetcher> fetcher_; 176 scoped_ptr<OAuth2AccessTokenFetcher> fetcher_;
177 177
178 // Variables that store fetch results. 178 // Variables that store fetch results.
179 // Initialized to be GoogleServiceAuthError::SERVICE_UNAVAILABLE to handle 179 // Initialized to be GoogleServiceAuthError::SERVICE_UNAVAILABLE to handle
180 // destruction. 180 // destruction.
181 GoogleServiceAuthError error_; 181 GoogleServiceAuthError error_;
182 std::string access_token_; 182 std::string access_token_;
183 base::Time expiration_date_; 183 base::Time expiration_date_;
184 184
185 // OAuth2 client id and secret. 185 // OAuth2 client id and secret.
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 const std::string& account_id, 822 const std::string& account_id,
823 const ScopeSet& scopes) const { 823 const ScopeSet& scopes) const {
824 PendingFetcherMap::const_iterator iter = pending_fetchers_.find( 824 PendingFetcherMap::const_iterator iter = pending_fetchers_.find(
825 OAuth2TokenService::RequestParameters( 825 OAuth2TokenService::RequestParameters(
826 client_id, 826 client_id,
827 account_id, 827 account_id,
828 scopes)); 828 scopes));
829 return iter == pending_fetchers_.end() ? 829 return iter == pending_fetchers_.end() ?
830 0 : iter->second->GetWaitingRequestCount(); 830 0 : iter->second->GetWaitingRequestCount();
831 } 831 }
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_network_controller_chromeos.h ('k') | google_apis/gaia/ubertoken_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698