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

Unified Diff: chrome/renderer/chrome_render_thread_observer.h

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.h
diff --git a/chrome/renderer/chrome_render_thread_observer.h b/chrome/renderer/chrome_render_thread_observer.h
index d93aec0e0122f0c53f43af4813ec886f31eb9ab8..cf22ad195264e6fe9d43747302767940d9d765e9 100644
--- a/chrome/renderer/chrome_render_thread_observer.h
+++ b/chrome/renderer/chrome_render_thread_observer.h
@@ -27,6 +27,10 @@ namespace content {
class ResourceDispatcherDelegate;
}
+namespace network_hints {
+class PrescientNetworkingDispatcher;
+}
+
// This class filters the incoming control messages (i.e. ones not destined for
// a RenderView) for Chrome specific messages that the content layer doesn't
// happen. If a few messages are related, they should probably have their own
@@ -43,6 +47,11 @@ class ChromeRenderThreadObserver : public content::RenderThreadObserver,
// |ChromeRenderThreadObserver|.
const RendererContentSettingRules* content_setting_rules() const;
+ network_hints::PrescientNetworkingDispatcher*
+ prescient_networking_dispatcher() {
+ return prescient_networking_dispatcher_.get();
+ }
+
private:
// Initializes field trial state change observation and notifies the browser
// of any field trials that might have already been activated.
@@ -50,6 +59,7 @@ class ChromeRenderThreadObserver : public content::RenderThreadObserver,
// content::RenderThreadObserver:
bool OnControlMessageReceived(const IPC::Message& message) override;
+ void OnRenderProcessShutdown() override;
// base::FieldTrialList::Observer:
void OnFieldTrialGroupFinalized(const std::string& trial_name,
@@ -68,6 +78,9 @@ class ChromeRenderThreadObserver : public content::RenderThreadObserver,
RendererContentSettingRules content_setting_rules_;
chrome_variations::ChildProcessFieldTrialSyncer field_trial_syncer_;
+ std::unique_ptr<network_hints::PrescientNetworkingDispatcher>
+ prescient_networking_dispatcher_;
+
base::WeakPtrFactory<ChromeRenderThreadObserver> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ChromeRenderThreadObserver);

Powered by Google App Engine
This is Rietveld 408576698