• Jérôme Lebel's avatar
    [iOS][Signin] Fixing crash related to the token cache. · 9e3ea37a
    Jérôme Lebel authored
    When a token is requested, HasCacheEntry() is called in
    StartCacheLookupRequest(). This call can potentially remove the cache
    entry. Therefore when getting the cache entry right after, it would
    be not available anymore.
    HasCacheEntry() method should never exist, since there is no warranty
    that the same cache entry would be returned by GetCacheEntry() on the
    next line of code.
    
    To solve the problem, StartCacheLookupRequest() is renamed to
    InformConsumerWithCacheEntry(), and only GetCacheEntry() is used.
    
    Bug: 791695
    Change-Id: Ie22c520cb0f2e2feec84781908b33ba2d0e791e5
    Reviewed-on: https://chromium-review.googlesource.com/817200Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
    Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#523399}
    9e3ea37a
oauth2_token_service.h 16.2 KB