
This change adds 3 changes. 1. Adds GetOrCreateBucket(). This is to be used by StorageBuckets API as well as by integrating Storage APIs querying for bucket id upon binding receivers at AddReceiver(). More details on the design doc [1] 2. Adds StorageType param to GetBucket & CreateBucket(ForTesting) method. Although StorageType should almost always be Temporary, we may need to query for Persistent type storage when migrating UsageTracker and QuotaClient to be integrated with buckets. We expect StorageTypes to be entirely removed as a part of crbug.com/1208141. 3. Renames CreateBucket -> CreateBucketForTesting. It also allows for creating a bucket that is not of StorageType kTemporary. This should not happen outside of test. Therefore name has been updated to make that clear. [1]https://docs.google.com/document/d/1VDm8M4vRyxCpvp_m3Ojs18W9g1WpqvSOsKf0A6hnAFM/edit?ts=60bfa3c1&pli=1#heading=h.xhaoskid7wdx Bug: 1203788 Change-Id: Ia4ef0fb2ed937e60b0c9c726e7dd7df9395ff2ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2965135 Commit-Queue: Ayu Ishii <ayui@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#895766}