• Joy Ming's avatar
    In_progress_cache : Read/write implementation. · 13a84569
    Joy Ming authored
    The in-progress cache is used to store metadata related to in-progress
    downloads. The entry for the download is created upon the initiation of
    the download and removed after the download is completed. This CL
    continues the implementation of the in-progress cache by implementing
    the read/write functionality in the following manner:
    
    - making the in-progress cache an interface.
    - initializing the cache during the creation of the download item,
    halting the completion of the creation until the cache is initialized
    (similar to the history database, which persists longer-term info).
    - reading from the file during initialization and storing information
    in an |entries| object.
    - updating the |entries| object when adding/replacing/deleting and then
    writing to the file using ImportantFileWriter.
    - including unittests for this process.
    
    Bug: 778425
    Change-Id: I8f69dd51dd619dbc688c0f2b6a3b079a3b1164ec
    Reviewed-on: https://chromium-review.googlesource.com/736907
    Commit-Queue: Joy Ming <jming@chromium.org>
    Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
    Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#521158}
    13a84569
BUILD.gn 1007 Bytes