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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 917063003: Chromecast: add platform hooks to inject browser/renderer message filters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
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 <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 content::RenderProcessHost* host) { 66 content::RenderProcessHost* host) {
67 scoped_refptr<content::BrowserMessageFilter> network_hints_message_filter( 67 scoped_refptr<content::BrowserMessageFilter> network_hints_message_filter(
68 new network_hints::NetworkHintsMessageFilter( 68 new network_hints::NetworkHintsMessageFilter(
69 url_request_context_factory_->host_resolver())); 69 url_request_context_factory_->host_resolver()));
70 host->AddFilter(network_hints_message_filter.get()); 70 host->AddFilter(network_hints_message_filter.get());
71 #if !defined(OS_ANDROID) 71 #if !defined(OS_ANDROID)
72 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter( 72 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter(
73 new media::CmaMessageFilterHost(host->GetID())); 73 new media::CmaMessageFilterHost(host->GetID()));
74 host->AddFilter(cma_message_filter.get()); 74 host->AddFilter(cma_message_filter.get());
75 #endif // !defined(OS_ANDROID) 75 #endif // !defined(OS_ANDROID)
76
77 auto extra_filters = PlatformGetBrowserMessageFilters();
78 for (auto const& filter : extra_filters) {
79 host->AddFilter(filter.get());
80 }
76 } 81 }
77 82
78 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext( 83 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext(
79 content::BrowserContext* browser_context, 84 content::BrowserContext* browser_context,
80 content::ProtocolHandlerMap* protocol_handlers, 85 content::ProtocolHandlerMap* protocol_handlers,
81 content::URLRequestInterceptorScopedVector request_interceptors) { 86 content::URLRequestInterceptorScopedVector request_interceptors) {
82 return url_request_context_factory_->CreateMainGetter( 87 return url_request_context_factory_->CreateMainGetter(
83 browser_context, 88 browser_context,
84 protocol_handlers, 89 protocol_handlers,
85 request_interceptors.Pass()); 90 request_interceptors.Pass());
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 process_type, dumps_path, false /* upload */); 339 process_type, dumps_path, false /* upload */);
335 // StartUploaderThread() even though upload is diferred. 340 // StartUploaderThread() even though upload is diferred.
336 // Breakpad-related memory is freed in the uploader thread. 341 // Breakpad-related memory is freed in the uploader thread.
337 crash_handler->StartUploaderThread(); 342 crash_handler->StartUploaderThread();
338 return crash_handler; 343 return crash_handler;
339 } 344 }
340 #endif // !defined(OS_ANDROID) 345 #endif // !defined(OS_ANDROID)
341 346
342 } // namespace shell 347 } // namespace shell
343 } // namespace chromecast 348 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/browser/cast_content_browser_client_simple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698