• mmenke's avatar
    When parsing cookie expiration times, saturate out of range dates · b6e73773
    mmenke authored
    rather than reject them.
    
    Roughly this means cookie expiration times prior to 1970 on (non-OSX)
    POSIX, or after 2038 on 32-bit (non-OSX) POSIX, will now be interpreted
    as either very small or very large base::Time values.
    
    This is a reland of https://codereview.chromium.org/2424443002/, which
    ran into issues due to base::Time::FromTimeT() returning Time::Max() when
    passed the maximum time_t value. As a workaround, ParseCookieExpirationTime
    now returns the min/max base::Time() values for times outside the supported
    range, instad of the min/max base::Time() values supported by
    Time::FromUTCExploded() on the current platform.
    
    BUG=649416
    
    Review-Url: https://chromiumcodereview.appspot.com/2438513003
    Cr-Commit-Position: refs/heads/master@{#426539}
    b6e73773
cookie_util.h 3.01 KB