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

Unified Diff: components/network_hints/renderer/prescient_networking_dispatcher.cc

Issue 2043083002: Speculatively launch Service Workers on mouse/touch events. [2/5] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert BUILD.gn Created 4 years, 5 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: components/network_hints/renderer/prescient_networking_dispatcher.cc
diff --git a/components/network_hints/renderer/prescient_networking_dispatcher.cc b/components/network_hints/renderer/prescient_networking_dispatcher.cc
index a5145ac48b9fd03475e15bfe59c8441df9e21d09..7284bc2f5bbb74e84a0826338fd59d58236b7ce1 100644
--- a/components/network_hints/renderer/prescient_networking_dispatcher.cc
+++ b/components/network_hints/renderer/prescient_networking_dispatcher.cc
@@ -5,6 +5,10 @@
#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
#include "base/logging.h"
+#include "components/network_hints/common/network_hints_messages.h"
+#include "content/public/renderer/render_thread.h"
+
+using content::RenderThread;
namespace network_hints {
@@ -30,4 +34,12 @@ void PrescientNetworkingDispatcher::preconnect(const blink::WebURL& url,
preconnect_.Preconnect(url, allow_credentials);
}
+void PrescientNetworkingDispatcher::sendNavigationHint(
+ const blink::WebURL& url,
+ blink::WebNavigationHintType type) {
+ if (!url.isValid())
+ return;
+ RenderThread::Get()->Send(new NetworkHintsMsg_NavigationHint(url, type));
+}
+
} // namespace network_hints

Powered by Google App Engine
This is Rietveld 408576698