Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 1303833002: Add WebPageImportanceSignals::issuedNonGetFetchFromScript() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: hook DocumentThreadableLoader Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/page/ChromeClient.h » ('j') | Source/core/page/ChromeClient.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 40891afc676d512ddcc161ff7ebda45b34e0d33c..2e5776ec25782c329c0225d94e7cc53246e0485a 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -48,6 +48,8 @@
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/ThreadableLoaderClient.h"
+#include "core/page/ChromeClient.h"
+#include "core/page/Page.h"
#include "platform/SharedBuffer.h"
#include "platform/Task.h"
#include "platform/network/ResourceRequest.h"
@@ -159,6 +161,9 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl
m_simpleRequestHeaders.add(header.key, header.value);
}
+ if (request.httpMethod() != "GET")
+ document.frame()->page()->chromeClient().observedNonGetFetchFromScript();
tyoshino (SeeGerritForStatus) 2015/09/24 08:14:11 use m_document for consistency with other users a
kouhei (in TOK) 2015/09/25 03:22:00 Done.
+
// If the fetch request will be handled by the ServiceWorker, the
// FetchRequestMode of the request must be FetchRequestModeCORS or
// FetchRequestModeCORSWithForcedPreflight. Otherwise the ServiceWorker can
« no previous file with comments | « no previous file | Source/core/page/ChromeClient.h » ('j') | Source/core/page/ChromeClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698