[ServiceWorkerCache] Make ServiceWorkerCache::Put guarantee callback like the header...
commit84de81c732b9f4289b1af338e9cd2844fd0e7429
authorjkarlin <jkarlin@chromium.org>
Mon, 27 Oct 2014 13:42:56 +0000 (27 06:42 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Oct 2014 13:43:22 +0000 (27 13:43 +0000)
tree2725b4eed687aff3a1eb6218f718312b2ff89087
parentf03588b9e8d1a79ada4d5305df9f7f15fa6d43ea
[ServiceWorkerCache] Make ServiceWorkerCache::Put guarantee callback like the header says

The Put() function performs an async init() with a weakptr callback.
If the weakptr is null then the callback won't be called, breaking the
contract that Put()'s callback will always be called.

This CL fixes that by making the PutImpl callback a static member (so
that it can access Cache::backend_).  The other Put callbacks and its
necessary classes came along for the ride.

Upstream of: https://codereview.chromium.org/649203005

BUG=426964

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

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