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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.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/browser/renderer_host/chrome_render_message_filter.h
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.h b/chrome/browser/renderer_host/chrome_render_message_filter.h
index 97bf627c4d9b248fab3f43afc9b43c69db0b858a..f6342dc8ce474341498da7f2b303f53526f7900f 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.h
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.h
@@ -11,7 +11,9 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/sequenced_task_runner_helpers.h"
+#include "components/network_hints/public/interfaces/network_hints.mojom.h"
#include "content/public/browser/browser_message_filter.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
class GURL;
class Profile;
@@ -34,7 +36,8 @@ class InfoMap;
// This class filters out incoming Chrome-specific IPC messages for the renderer
// process on the IPC thread.
-class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
+class ChromeRenderMessageFilter : public content::BrowserMessageFilter,
+ public network_hints::mojom::NetworkHints {
dcheng 2016/07/20 13:59:50 Does that mean this is going to end up implementin
tibell 2016/07/21 00:12:06 Yes potentially. At some point it probably makes s
public:
ChromeRenderMessageFilter(int render_process_id, Profile* profile);
@@ -43,14 +46,18 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
void OverrideThreadForMessage(const IPC::Message& message,
content::BrowserThread::ID* thread) override;
+ void BindNetworkHints(network_hints::mojom::NetworkHintsRequest request);
+
private:
friend class content::BrowserThread;
friend class base::DeleteHelper<ChromeRenderMessageFilter>;
~ChromeRenderMessageFilter() override;
- void OnDnsPrefetch(const network_hints::LookupRequest& request);
- void OnPreconnect(const GURL& url, bool allow_credentials, int count);
+ // mojom::NetworkHints methods:
+ void DNSPrefetch(const network_hints::LookupRequest& request) override;
+ void Preconnect(const GURL& url, bool allow_credentials, int count) override;
+
void OnUpdatedCacheStats(uint64_t min_capacity,
uint64_t max_capacity,
uint64_t capacity,
@@ -132,6 +139,8 @@ class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
// Used to look up permissions at database creation time.
scoped_refptr<content_settings::CookieSettings> cookie_settings_;
+ mojo::BindingSet<network_hints::mojom::NetworkHints> bindings_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter);
};

Powered by Google App Engine
This is Rietveld 408576698