| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 namespace { | 249 namespace { |
| 250 | 250 |
| 251 const char kSiteProcessMapKeyName[] = "content_site_process_map"; | 251 const char kSiteProcessMapKeyName[] = "content_site_process_map"; |
| 252 | 252 |
| 253 #ifdef ENABLE_WEBRTC | 253 #ifdef ENABLE_WEBRTC |
| 254 const base::FilePath::CharType kAecDumpFileNameAddition[] = | 254 const base::FilePath::CharType kAecDumpFileNameAddition[] = |
| 255 FILE_PATH_LITERAL("aec_dump"); | 255 FILE_PATH_LITERAL("aec_dump"); |
| 256 #endif | 256 #endif |
| 257 | 257 |
| 258 void CacheShaderInfo(int32_t id, base::FilePath path) { | 258 void CacheShaderInfo(int32_t id, base::FilePath path) { |
| 259 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 259 if (ShaderCacheFactory::GetInstance()) |
| 260 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); |
| 260 } | 261 } |
| 261 | 262 |
| 262 void RemoveShaderInfo(int32_t id) { | 263 void RemoveShaderInfo(int32_t id) { |
| 263 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 264 if (ShaderCacheFactory::GetInstance()) |
| 265 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); |
| 264 } | 266 } |
| 265 | 267 |
| 266 net::URLRequestContext* GetRequestContext( | 268 net::URLRequestContext* GetRequestContext( |
| 267 scoped_refptr<net::URLRequestContextGetter> request_context, | 269 scoped_refptr<net::URLRequestContextGetter> request_context, |
| 268 scoped_refptr<net::URLRequestContextGetter> media_request_context, | 270 scoped_refptr<net::URLRequestContextGetter> media_request_context, |
| 269 ResourceType resource_type) { | 271 ResourceType resource_type) { |
| 270 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request | 272 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request |
| 271 // context specific to media for handling it because these resources have | 273 // context specific to media for handling it because these resources have |
| 272 // specific needs for caching. | 274 // specific needs for caching. |
| 273 if (resource_type == RESOURCE_TYPE_MEDIA) | 275 if (resource_type == RESOURCE_TYPE_MEDIA) |
| (...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2976 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2978 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2977 | 2979 |
| 2978 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2980 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2979 // enough information here so that we can determine what the bad message was. | 2981 // enough information here so that we can determine what the bad message was. |
| 2980 base::debug::Alias(&error); | 2982 base::debug::Alias(&error); |
| 2981 bad_message::ReceivedBadMessage(render_process_id, | 2983 bad_message::ReceivedBadMessage(render_process_id, |
| 2982 bad_message::RPH_MOJO_PROCESS_ERROR); | 2984 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2983 } | 2985 } |
| 2984 | 2986 |
| 2985 } // namespace content | 2987 } // namespace content |
| OLD | NEW |