OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/signin/oauth2_token_service.h" | 5 #include "chrome/browser/signin/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" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "google_apis/gaia/gaia_urls.h" | 17 #include "google_apis/gaia/gaia_urls.h" |
18 #include "google_apis/gaia/google_service_auth_error.h" | 18 #include "google_apis/gaia/google_service_auth_error.h" |
19 #include "google_apis/gaia/oauth2_access_token_consumer.h" | 19 #include "google_apis/gaia/oauth2_access_token_consumer.h" |
20 #include "google_apis/gaia/oauth2_access_token_fetcher.h" | 20 #include "google_apis/gaia/oauth2_access_token_fetcher.h" |
21 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 int OAuth2TokenService::cache_size_for_testing() const { | 489 int OAuth2TokenService::cache_size_for_testing() const { |
490 return token_cache_.size(); | 490 return token_cache_.size(); |
491 } | 491 } |
492 | 492 |
493 void OAuth2TokenService::set_max_authorization_token_fetch_retries_for_testing( | 493 void OAuth2TokenService::set_max_authorization_token_fetch_retries_for_testing( |
494 int max_retries) { | 494 int max_retries) { |
495 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 495 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
496 max_fetch_retry_num_ = max_retries; | 496 max_fetch_retry_num_ = max_retries; |
497 } | 497 } |
OLD | NEW |