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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « chromecast/browser/DEPS ('k') | chromecast/browser/url_request_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/scoped_file.h" 8 #include "base/files/scoped_file.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "chromecast/browser/cast_browser_context.h" 11 #include "chromecast/browser/cast_browser_context.h"
12 #include "chromecast/browser/cast_browser_main_parts.h" 12 #include "chromecast/browser/cast_browser_main_parts.h"
13 #include "chromecast/browser/cast_browser_process.h" 13 #include "chromecast/browser/cast_browser_process.h"
14 #include "chromecast/browser/cast_network_delegate.h" 14 #include "chromecast/browser/cast_network_delegate.h"
15 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" 15 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h"
16 #include "chromecast/browser/geolocation/cast_access_token_store.h" 16 #include "chromecast/browser/geolocation/cast_access_token_store.h"
17 #include "chromecast/browser/url_request_context_factory.h" 17 #include "chromecast/browser/url_request_context_factory.h"
18 #include "chromecast/common/cast_paths.h" 18 #include "chromecast/common/cast_paths.h"
19 #include "chromecast/common/global_descriptors.h" 19 #include "chromecast/common/global_descriptors.h"
20 #include "components/crash/app/breakpad_linux.h" 20 #include "components/crash/app/breakpad_linux.h"
21 #include "components/dns_prefetch/browser/net_message_filter.h"
21 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/certificate_request_result_type.h" 23 #include "content/public/browser/certificate_request_result_type.h"
23 #include "content/public/browser/render_process_host.h" 24 #include "content/public/browser/render_process_host.h"
24 #include "content/public/common/content_descriptors.h" 25 #include "content/public/common/content_descriptors.h"
25 #include "content/public/common/content_switches.h" 26 #include "content/public/common/content_switches.h"
26 #include "content/public/common/url_constants.h" 27 #include "content/public/common/url_constants.h"
27 #include "content/public/common/web_preferences.h" 28 #include "content/public/common/web_preferences.h"
28 #include "net/ssl/ssl_cert_request_info.h" 29 #include "net/ssl/ssl_cert_request_info.h"
29 30
30 #if defined(OS_ANDROID) 31 #if defined(OS_ANDROID)
(...skipping 19 matching lines...) Expand all
50 } 51 }
51 52
52 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( 53 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts(
53 const content::MainFunctionParams& parameters) { 54 const content::MainFunctionParams& parameters) {
54 return new CastBrowserMainParts(parameters, 55 return new CastBrowserMainParts(parameters,
55 url_request_context_factory_.get()); 56 url_request_context_factory_.get());
56 } 57 }
57 58
58 void CastContentBrowserClient::RenderProcessWillLaunch( 59 void CastContentBrowserClient::RenderProcessWillLaunch(
59 content::RenderProcessHost* host) { 60 content::RenderProcessHost* host) {
61 scoped_refptr<content::BrowserMessageFilter> net_message_filter(
62 new dns_prefetch::NetMessageFilter(
63 url_request_context_factory_->host_resolver()));
64 host->AddFilter(net_message_filter.get());
60 } 65 }
61 66
62 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext( 67 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext(
63 content::BrowserContext* browser_context, 68 content::BrowserContext* browser_context,
64 content::ProtocolHandlerMap* protocol_handlers, 69 content::ProtocolHandlerMap* protocol_handlers,
65 content::URLRequestInterceptorScopedVector request_interceptors) { 70 content::URLRequestInterceptorScopedVector request_interceptors) {
66 return url_request_context_factory_->CreateMainGetter( 71 return url_request_context_factory_->CreateMainGetter(
67 browser_context, 72 browser_context,
68 protocol_handlers, 73 protocol_handlers,
69 request_interceptors.Pass()); 74 request_interceptors.Pass());
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 content::ExternalVideoSurfaceContainer* 267 content::ExternalVideoSurfaceContainer*
263 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 268 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
264 content::WebContents* web_contents) { 269 content::WebContents* web_contents) {
265 return new ExternalVideoSurfaceContainerImpl(web_contents); 270 return new ExternalVideoSurfaceContainerImpl(web_contents);
266 } 271 }
267 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) 272 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE)
268 273
269 274
270 } // namespace shell 275 } // namespace shell
271 } // namespace chromecast 276 } // namespace chromecast
OLDNEW
« 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