Chromium Code Reviews| Index: chrome/browser/chrome_to_mobile_service.h |
| diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h |
| index cb84e40c19cee2d37e5dce366c7b619dc52b0876..d445890bd158cdeee41f4b26df5eced22d8e2232 100644 |
| --- a/chrome/browser/chrome_to_mobile_service.h |
| +++ b/chrome/browser/chrome_to_mobile_service.h |
| @@ -14,6 +14,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/file_path.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/memory/scoped_vector.h" |
|
Raghu Simha
2012/09/07 17:15:55
nit: This goes above weak_ptr.h.
|
| #include "base/string16.h" |
| #include "base/timer.h" |
| #include "base/values.h" |
| @@ -67,6 +68,14 @@ class ChromeToMobileService : public ProfileKeyedService, |
| SEND_SUCCESS, // Cloud print responded with success on send. |
| SEND_ERROR, // Cloud print responded with failure on send. |
| LEARN_MORE_CLICKED, // The "Learn more" help article link was clicked. |
| + BAD_TOKEN, // The cloud print access token could not be minted. |
| + BAD_SEARCH_AUTH, // The cloud print search request failed (auth). |
| + BAD_SEARCH_OTHER, // The cloud print search request failed (other). |
| + BAD_SEND_407, // The cloud print send response was errorCode==407. |
| + // "Print job added but failed to notify printer..." |
| + BAD_SEND_ERROR, // The cloud print send response was errorCode!=407. |
| + BAD_SEND_AUTH, // The cloud print send request failed (auth). |
| + BAD_SEND_OTHER, // The cloud print send request failed (other). |
| NUM_METRICS |
| }; |
| @@ -223,9 +232,13 @@ class ChromeToMobileService : public ProfileKeyedService, |
| RequestObserverMap; |
| RequestObserverMap request_observer_map_; |
| - // The pending OAuth access token request and a timer for retrying on failure. |
| + // The list of active URLFetcher requests owned by the service. |
| + ScopedVector<net::URLFetcher> url_fetchers_; |
| + |
| + // The pending OAuth access token request and timers for retrying on failure. |
| scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_; |
| base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; |
| + base::OneShotTimer<ChromeToMobileService> search_retry_timer_; |
| // A queue of tasks to perform after an access token is lazily initialized. |
| std::queue<base::Closure> task_queue_; |