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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2343623002: Add a warning whenever link preloads are not used (Closed)
Patch Set: Added comment Created 4 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
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index def2685b5e02f75e61d2765ba8cf9a6de37b01f1..9a580b0fdfc811bcfbea3f2918efd1e6059bd892 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -653,10 +653,11 @@ void FrameFetchContext::sendImagePing(const KURL& url)
PingLoader::loadImage(frame(), url);
}
-void FrameFetchContext::addConsoleMessage(const String& message) const
+void FrameFetchContext::addConsoleMessage(const String& message, LogMessageType messageType) const
{
+ MessageLevel level = messageType == LogWarningMessage ? WarningMessageLevel : ErrorMessageLevel;
if (frame()->document())
- frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
+ frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, level, message));
}
SecurityOrigin* FrameFetchContext::getSecurityOrigin() const

Powered by Google App Engine
This is Rietveld 408576698