| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <objidl.h> | 9 #include <objidl.h> |
| 10 #include <mlang.h> | 10 #include <mlang.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include "chrome/renderer/render_process_impl.h" | 13 #include "chrome/renderer/render_process_impl.h" |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
| 19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/nss_util.h" | |
| 22 #include "base/path_service.h" | 21 #include "base/path_service.h" |
| 23 #include "base/sys_info.h" | 22 #include "base/sys_info.h" |
| 24 #include "base/utf_string_conversions.h" | 23 #include "base/utf_string_conversions.h" |
| 24 #include "crypto/nss_util.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
| 27 #include "chrome/common/render_messages.h" | 27 #include "chrome/common/render_messages.h" |
| 28 #include "chrome/renderer/render_thread.h" | 28 #include "chrome/renderer/render_thread.h" |
| 29 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
| 30 #include "content/renderer/render_view.h" | 30 #include "content/renderer/render_view.h" |
| 31 #include "ipc/ipc_channel.h" | 31 #include "ipc/ipc_channel.h" |
| 32 #include "ipc/ipc_message_utils.h" | 32 #include "ipc/ipc_message_utils.h" |
| 33 #include "media/base/media.h" | 33 #include "media/base/media.h" |
| 34 #include "media/base/media_switches.h" | 34 #include "media/base/media_switches.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 #if defined(OS_LINUX) | 162 #if defined(OS_LINUX) |
| 163 // Remoting requires NSS to function properly. | 163 // Remoting requires NSS to function properly. |
| 164 | 164 |
| 165 if (!command_line.HasSwitch(switches::kSingleProcess) && | 165 if (!command_line.HasSwitch(switches::kSingleProcess) && |
| 166 command_line.HasSwitch(switches::kEnableRemoting)) { | 166 command_line.HasSwitch(switches::kEnableRemoting)) { |
| 167 #if defined(USE_NSS) | 167 #if defined(USE_NSS) |
| 168 // We are going to fork to engage the sandbox and we have not loaded | 168 // We are going to fork to engage the sandbox and we have not loaded |
| 169 // any security modules so it is safe to disable the fork check in NSS. | 169 // any security modules so it is safe to disable the fork check in NSS. |
| 170 base::DisableNSSForkCheck(); | 170 crypto::DisableNSSForkCheck(); |
| 171 base::ForceNSSNoDBInit(); | 171 crypto::ForceNSSNoDBInit(); |
| 172 base::EnsureNSSInit(); | 172 crypto::EnsureNSSInit(); |
| 173 #else | 173 #else |
| 174 // TODO(bulach): implement openssl support. | 174 // TODO(bulach): implement openssl support. |
| 175 NOTREACHED() << "Remoting is not supported for openssl"; | 175 NOTREACHED() << "Remoting is not supported for openssl"; |
| 176 #endif | 176 #endif |
| 177 } | 177 } |
| 178 #endif | 178 #endif |
| 179 } | 179 } |
| 180 | 180 |
| 181 RenderProcessImpl::~RenderProcessImpl() { | 181 RenderProcessImpl::~RenderProcessImpl() { |
| 182 // TODO(port): Try and limit what we pull in for our non-Win unit test bundle. | 182 // TODO(port): Try and limit what we pull in for our non-Win unit test bundle. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 338 } |
| 339 | 339 |
| 340 void RenderProcessImpl::ClearTransportDIBCache() { | 340 void RenderProcessImpl::ClearTransportDIBCache() { |
| 341 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 341 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
| 342 if (shared_mem_cache_[i]) { | 342 if (shared_mem_cache_[i]) { |
| 343 FreeTransportDIB(shared_mem_cache_[i]); | 343 FreeTransportDIB(shared_mem_cache_[i]); |
| 344 shared_mem_cache_[i] = NULL; | 344 shared_mem_cache_[i] = NULL; |
| 345 } | 345 } |
| 346 } | 346 } |
| 347 } | 347 } |
| OLD | NEW |