diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 19:28:29 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 19:28:29 +0000 |
commit | 88b51197878df4ad346034f0ec8c29a6341d79a4 (patch) | |
tree | c0e9822ff7a7cbc2482c8a1ff83bf0f8c8076c2d /chrome/browser/chrome_to_mobile_service.h | |
parent | 08a6f99997bad56869412e1da065acda3dc41538 (diff) | |
download | chromium_src-88b51197878df4ad346034f0ec8c29a6341d79a4.zip chromium_src-88b51197878df4ad346034f0ec8c29a6341d79a4.tar.gz chromium_src-88b51197878df4ad346034f0ec8c29a6341d79a4.tar.bz2 |
Revert 155364 - Revert 155317 - Adjust ChromeToMobile error logging and mitigation.
The original CL was reverted as suspect for the sync_integration_tests problem below.
The actual defect (leaking URLFetchers) was fixed with http://crrev.com/155417
------
See http://build.chromium.org/p/chromium/builders/Win7%20Sync/builds/25157/steps/sync_integration_tests/logs/stdio .
Specifically:
Sendin[1920:3900:0907/000156:407089812:FATAL:url_request_context.cc(99)] Check failed: false. Leaked 2 URLRequest(s). First URL: https://www.google.com/cloudprint/search?requestor=chrome-to-mobile.
[1920:3900:0907/000156:407089812:FATAL:url_request_context.cc(99)] Check failed: false. Leaked 2 URLRequest(s). First URL: https://www.google.com/cloudprint/search?requestor=chrome-to-mobile.
My suspicion is that by increasing retries, it ended up that a request was still going when the browser is shutting down.
Verify that these requests are being properly stopped/destroyed before the context they are using goes away.
------
Increase kMaxRetries for URLFetcher to 5 (common elsewhere).
Decrease kDelayHours for URLFetcher to 1hr (w/exp backoff).
Clear |access_token_| with new kGaiaOAuth2LoginAccessToken.
Clear |access_token_| *and devices* on OnGetTokenFailure().
Handle invalid login refresh tokens as OnGetTokenFailure().
Clear token, devices, retry on 403 (auth) search responses.
Add and log some new BAD_* UMA Metric enum values.
(407 related to Issue 146685 and perhaps Issue 137267)
LOG (Chrome, not UMA) send response data on failure.
Corresponding src/tools/histograms/histograms.xml change:
https://chromereviews.googleplex.com/4782033
BUG=102709,120941,146685
TEST=Less Chrome To Mobile failures, additional insightful logging.
Review URL: https://chromiumcodereview.appspot.com/10913089
TBR=msw@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10909115
TBR=erikwright@chromium.org,sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10914155
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155449 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_to_mobile_service.h')
-rw-r--r-- | chrome/browser/chrome_to_mobile_service.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h index 21245d7..c0fc92f 100644 --- a/chrome/browser/chrome_to_mobile_service.h +++ b/chrome/browser/chrome_to_mobile_service.h @@ -68,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 }; @@ -226,9 +234,10 @@ class ChromeToMobileService : public ProfileKeyedService, RequestObserverMap; RequestObserverMap request_observer_map_; - // The pending OAuth access token request and a timer for retrying on failure. + // 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_; |