Shut down the ServiceWorker system as the browser's shutting down.
commit294bdb3806c1b0a776b4059847610c2268c68f1e
authorjyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 30 May 2014 07:01:54 +0000 (30 07:01 +0000)
committerjyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 30 May 2014 07:01:54 +0000 (30 07:01 +0000)
treef0d629556a699f70ba90795260d97996ba68bf67
parent92ab63c6f5ef6fd42276597ed2ac56f215c2d873
Shut down the ServiceWorker system as the browser's shutting down.

This avoids a DCHECK in ProfileDestroyer::DestroyProfileWhenAppropriate.

I also added a Chrome-side browsertest for the Service Worker system, where we
can check other things that only show up with this embedder.

I tried to move the DCHECK into ~BrowserContext so that we wouldn't need to
expose the Terminate() function across the Content API, but:
* BrowserContext doesn't know whether it's a "testing" profile.
* There is no BrowserContext::GetOffTheRecordProfile with which to check that
  transitive processes have been shut down.
* (Minor) GetHostsForProfile() works by iterating over all hosts, and moving the
  DCHECK to ~BrowserContext would have doubled the number of iterations needed.

BUG=368570

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273741 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/browser_process_impl.cc
chrome/browser/chrome_service_worker_browsertest.cc [new file with mode: 0644]
chrome/chrome_tests.gypi
content/browser/service_worker/service_worker_context_wrapper.cc
content/browser/service_worker/service_worker_context_wrapper.h
content/browser/service_worker/service_worker_job_coordinator.cc
content/browser/service_worker/service_worker_job_coordinator.h
content/browser/service_worker/service_worker_process_manager.cc
content/browser/service_worker/service_worker_register_job.cc
content/public/browser/service_worker_context.h