• pavely@chromium.org's avatar
    Prevent invalidating refresh token on transient errors. · 83d10dd5
    pavely@chromium.org authored
    Problem:
    When access token request fails with unexpected errors those get
    translated to "invalid credentials". In response auth_sync_observer.cc
    marks refresh token as invalid which prevents offline auth on next startup.
    
    oauth2_access_token_fetcher_impl.cc:
     - Handle all 5xx http codes as transient errors.
     - Log error for unexpected codes.
    
    profile_sync_service.cc:
     - handle REQUEST_CANCELLED and SERVICE_ERROR as transient error, retry instead of
       notifying observers.
     - Log error for unexpected auth errors.
    
    BUG=394939
    R=rogerta@chromium.org,zea@chromium.org
    
    Review URL: https://codereview.chromium.org/472403002
    
    Cr-Commit-Position: refs/heads/master@{#290158}
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290158 0039d316-1c4b-4281-b951-d872f2087c98
    83d10dd5
profile_sync_service.cc 99.4 KB