• Chris Mumford's avatar
    indexeddb: Make IndexedDBContextImpl::data_path_ constant. · 2236b777
    Chris Mumford authored
    Make IndexedDBContextImpl::data_path_ a constant member as it is
    never changed. Doing so makes it easier to reason about safe
    access on different sequences. set_data_path_for_testing() existed,
    and was used by IndexedDBQuotaClientTest, but was only ever set to
    the same path passed to the IndexedDBContextImpl constructor.
    
    Also make IndexedDBContextImpl::data_path() return a const reference
    to avoid unnecessary creation of intermediate base::FilePath
    instances.
    
    Bug: none
    Change-Id: If7c5a960c30dd7d4858fd332437548d7363247d1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606651Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
    Commit-Queue: Chris Mumford <cmumford@google.com>
    Cr-Commit-Position: refs/heads/master@{#839666}
    2236b777
indexed_db_context_impl.cc 32.3 KB