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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 785693002: Adds DNS prefetch support to Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetch-browser
Patch Set: add blink dep to gyp/gn Created 6 years 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
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/url_request_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index cf572382880c1ae2c369b4f03f7f2cac17e1c775..c13c215caf5d2bd6a467007c093275fd233c158e 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -18,6 +18,7 @@
#include "chromecast/common/cast_paths.h"
#include "chromecast/common/global_descriptors.h"
#include "components/crash/app/breakpad_linux.h"
+#include "components/dns_prefetch/browser/net_message_filter.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/certificate_request_result_type.h"
#include "content/public/browser/render_process_host.h"
@@ -57,6 +58,10 @@ content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts(
void CastContentBrowserClient::RenderProcessWillLaunch(
content::RenderProcessHost* host) {
+ scoped_refptr<content::BrowserMessageFilter> net_message_filter(
+ new dns_prefetch::NetMessageFilter(
+ url_request_context_factory_->host_resolver()));
+ host->AddFilter(net_message_filter.get());
}
net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext(
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/url_request_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698