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

Unified Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2144533002: Convert network hints to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sammc's review comments 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: chrome/renderer/chrome_render_thread_observer.cc
diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
index a5752171bff3f0ca5965870051992a74d2bb3c27..1a92eddc71ba3de01075f1d214527ebec46aaf15 100644
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -37,6 +37,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/renderer/content_settings_observer.h"
#include "chrome/renderer/security_filter_peer.h"
+#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
#include "content/public/child/resource_dispatcher_delegate.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
@@ -235,7 +236,10 @@ void CreateResourceUsageReporter(
bool ChromeRenderThreadObserver::is_incognito_process_ = false;
ChromeRenderThreadObserver::ChromeRenderThreadObserver()
- : field_trial_syncer_(this), weak_factory_(this) {
+ : field_trial_syncer_(this),
+ prescient_networking_dispatcher_(
+ new network_hints::PrescientNetworkingDispatcher()),
+ weak_factory_(this) {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
@@ -283,6 +287,10 @@ bool ChromeRenderThreadObserver::OnControlMessageReceived(
return handled;
}
+void ChromeRenderThreadObserver::OnRenderProcessShutdown() {
+ prescient_networking_dispatcher_.reset();
+}
+
void ChromeRenderThreadObserver::OnFieldTrialGroupFinalized(
const std::string& trial_name,
const std::string& group_name) {

Powered by Google App Engine
This is Rietveld 408576698