ServiceWorker: Add a helper to disassociate pending version from documents
commit94ed7ea45f7ed3f69a5015c78b3946a2a8df3e10
authornhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 29 May 2014 17:48:32 +0000 (29 17:48 +0000)
committernhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 29 May 2014 17:48:32 +0000 (29 17:48 +0000)
treeea83fdca48cdbeea0714a48f9de7cc4c54e51a7a
parent0cda2998953a648624b9875677bcfc26e535a1f1
ServiceWorker: Add a helper to disassociate pending version from documents

Current implementation uses AssociatePendingVersionToDocuments() to
disassociate a specific pending version from documents, but actually
associating and disassociating should be done by different flow:

- Associating a pending version to documents matched with the version's
scope.
- Disassociating a pending version having a specific version id from
documents.

This CL adds a helper function for disassociating and refactors tests.

BUG=n/a
TEST=content_unittests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273518 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/service_worker/service_worker_provider_host_unittest.cc
content/browser/service_worker/service_worker_register_job.cc
content/browser/service_worker/service_worker_register_job.h
content/browser/service_worker/service_worker_version.h