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) { |