• pkotwicz's avatar
    Fix WebappDataStorage#updateDidLastWebApkUpdateRequestSucceed() corner cases · 62ed2afc
    pkotwicz authored
    This CL fixes three corner cases:
    1) This CL sets the "WebAPK update" as having succeeded if:
      - the previous WebAPK update failed
      AND
      - A WebAPK update is no longer needed
      Doing this is important because the is-webapk-update-needed check is
      done much more frequently if the "previous WebAPK update failed."
    2) This CL ignores whether the "WebAPK update" has previously succeeded if
       there have been no update attempts.
       The goal is to wait at least WebApkUpdateManager#FULL_CHECK_UPDATE_INTERVAL
       since the WebAPK's first launch before checking for updates.
    3) This CL sets the "WebAPK update" as having failed if Chrome is killed
      after the time that the WebAPK update is requested but before
      WebApkUpdateManager#onBuiltWebApk() is called.
    
    BUG=639536
    TEST=WebApkManagerTest.*
    R=dominickn, mlamouri
    TBR=tedchoc (For new dependencies to chrome_junit_tests in BUILD.gn)
    
    Review-Url: https://chromiumcodereview.appspot.com/2430773002
    Cr-Commit-Position: refs/heads/master@{#426868}
    62ed2afc
BUILD.gn 405 Bytes