| Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| index cd0ad37635b8179069d1bfc7e22ee43e7f2f4497..1be7ca6403814b528d1d7399cfe1e8a51fad26e7 100644
|
| --- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
|
| @@ -38,6 +38,7 @@
|
| #include "core/fetch/ImageResource.h"
|
| #include "core/fetch/MemoryCache.h"
|
| #include "core/fetch/ResourceFetcher.h"
|
| +#include "core/frame/Deprecation.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| @@ -317,6 +318,19 @@ void DocumentLoader::finishedLoading(double finishTime) {
|
| if (m_state < MainResourceDone)
|
| m_state = MainResourceDone;
|
| clearMainResourceHandle();
|
| +
|
| + // Shows the deprecation message and measures the impact of the new security
|
| + // restriction which disallows responding to navigation requests with
|
| + // redirected responses in the service worker.
|
| + // TODO(horo): Remove this when we actually introduce the restriction in
|
| + // RespondWithObserver.
|
| + if (m_response.wasFetchedViaServiceWorker() &&
|
| + m_response.urlListViaServiceWorker().size() > 1) {
|
| + Deprecation::countDeprecation(
|
| + m_frame,
|
| + UseCounter::
|
| + ServiceWorkerRespondToNavigationRequestWithRedirectedResponse);
|
| + }
|
| }
|
|
|
| bool DocumentLoader::redirectReceived(
|
|
|