ServiceWorker: Migrate the script cache backend from BlockFile to Simple

This CL switches the backend of ServiceWorkerDiskCache from BlockFile to Simple,
and migrates cached resources before initializing the diskcache.

* DiskCache migration consists of 2 parts:
1) Copying contents into a new diskcache. This should be complete before
starting diskcache initialization.
2) Lazily removing an old diskcache after migration is complete.

* These migration states are recorded in ServiceWorkerDatabase. If migration
is aborted in the middle of the execution, the retry will happen on the next
initialization.

* If migration fails, DeleteAndStartOver runs and creates a new storage.

BUG=487482
TEST=content_unittests --gtest_filter=ServiceWorker*
TEST=content_browsertests --gtest_filter=ServiceWorker*
TEST=manual (run Chromium with an old diskcache and make sure migration correctly happens)

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

Cr-Commit-Position: refs/heads/master@{#334811}


CrOS-Libchrome-Original-Commit: d1c9f9fbe26992894355b68f0445e03c2061908f
1 file changed
tree: ffe4179afb2c0e0f298e63968a42a6b238ee9ff2
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/