ServiceWorker: Avoid creating a new SWNetworkProvider when navigation happens within...
commite2a412193c00f750ae497f83efd784ebbadb10ee
authornhiroki <nhiroki@chromium.org>
Thu, 27 Nov 2014 18:39:42 +0000 (27 10:39 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 27 Nov 2014 18:40:02 +0000 (27 18:40 +0000)
tree431ed9877f2c53fbb30ba01b95686f5701abb105
parent704263df6d8241491f4f1ed93dd1a19f65aaade6
ServiceWorker: Avoid creating a new SWNetworkProvider when navigation happens within a page

Before this patch, navigation within a page (eg. location.hash, pushState())
unexpectedly disables the fetch event routing on Service Worker because such
navigation always creates a new ServiceWorkerNetworkProvider instance even
though actual page transition does not occur.

This change avoids creating a new provider on the navigation-within-page and
keeps the initial service worker even if the document url changed into either
an out-of-scope url or an in-scope url controlled by other service worker.

Layout tests will be added by https://codereview.chromium.org/758413002/

BUG=429972,433708
TEST=run-webkit-tests http/tests/serviceworker (https://codereview.chromium.org/758413002/)

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

Cr-Commit-Position: refs/heads/master@{#306017}
content/renderer/render_frame_impl.cc