Change ownership of the parameters to ServiceWorkerCache:: Put and Match.
commit9f0f48cb851f273478579c14b3059acc8009b295
authorjkarlin <jkarlin@chromium.org>
Thu, 11 Sep 2014 10:19:56 +0000 (11 03:19 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 11 Sep 2014 10:22:03 +0000 (11 10:22 +0000)
treee80d0ccf85c84f0d115dcc8a6a0078956b9fd32e
parent9d84bde186bd2c504311257bcee92212a64cd57c
Change ownership of the parameters to ServiceWorkerCache:: Put and Match.

These functions used to take unowned raw pointers as arguments.  Now the functions own them and they're scoped_ptrs.  This both makes ownership clearer and allows for the functions to terminate early without calling their callbacks (needed for a downstream change to run CreateBackend lazily).

Related CLs:
* 1. https://crrev.com/542703002: Change ownership of the parameters to ServiceWorkerCache:: Put and Match.
2. https://crrev.com/545533002: Move ServiceWorkerCache backend creation to a lazy init function.
3. https://crrev.com/548533002: Make ServiceWorkerCacheStorage::CacheLoader::LoadCache synchronous
4. https://crrev.com/549493002: Expose ServiceWorkerCache objects to ServiceWorkerCacheStorageManager clients.

BUG=392621

Review URL: https://codereview.chromium.org/542703002

Cr-Commit-Position: refs/heads/master@{#294366}
content/browser/service_worker/service_worker_cache.cc
content/browser/service_worker/service_worker_cache.h
content/browser/service_worker/service_worker_cache_unittest.cc