| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 content::RenderProcessHost::FromID(render_process_id); | 181 content::RenderProcessHost::FromID(render_process_id); |
| 182 if (!host) | 182 if (!host) |
| 183 return; | 183 return; |
| 184 | 184 |
| 185 scoped_refptr<content::BrowserMessageFilter> network_hints_message_filter( | 185 scoped_refptr<content::BrowserMessageFilter> network_hints_message_filter( |
| 186 new network_hints::NetworkHintsMessageFilter( | 186 new network_hints::NetworkHintsMessageFilter( |
| 187 url_request_context_factory_->host_resolver())); | 187 url_request_context_factory_->host_resolver())); |
| 188 host->AddFilter(network_hints_message_filter.get()); | 188 host->AddFilter(network_hints_message_filter.get()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 net::URLRequestContextGetter* CastContentBrowserClient::CreateRequestContext( | |
| 192 content::BrowserContext* browser_context, | |
| 193 content::ProtocolHandlerMap* protocol_handlers, | |
| 194 content::URLRequestInterceptorScopedVector request_interceptors) { | |
| 195 return url_request_context_factory_->CreateMainGetter( | |
| 196 browser_context, protocol_handlers, std::move(request_interceptors)); | |
| 197 } | |
| 198 | |
| 199 bool CastContentBrowserClient::IsHandledURL(const GURL& url) { | 191 bool CastContentBrowserClient::IsHandledURL(const GURL& url) { |
| 200 if (!url.is_valid()) | 192 if (!url.is_valid()) |
| 201 return false; | 193 return false; |
| 202 | 194 |
| 203 static const char* const kProtocolList[] = { | 195 static const char* const kProtocolList[] = { |
| 204 content::kChromeUIScheme, | 196 content::kChromeUIScheme, |
| 205 content::kChromeDevToolsScheme, | 197 content::kChromeDevToolsScheme, |
| 206 kChromeResourceScheme, | 198 kChromeResourceScheme, |
| 207 url::kBlobScheme, | 199 url::kBlobScheme, |
| 208 url::kDataScheme, | 200 url::kDataScheme, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 process_type, dumps_path, false /* upload */); | 487 process_type, dumps_path, false /* upload */); |
| 496 // StartUploaderThread() even though upload is diferred. | 488 // StartUploaderThread() even though upload is diferred. |
| 497 // Breakpad-related memory is freed in the uploader thread. | 489 // Breakpad-related memory is freed in the uploader thread. |
| 498 crash_handler->StartUploaderThread(); | 490 crash_handler->StartUploaderThread(); |
| 499 return crash_handler; | 491 return crash_handler; |
| 500 } | 492 } |
| 501 #endif // !defined(OS_ANDROID) | 493 #endif // !defined(OS_ANDROID) |
| 502 | 494 |
| 503 } // namespace shell | 495 } // namespace shell |
| 504 } // namespace chromecast | 496 } // namespace chromecast |
| OLD | NEW |