OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 file_util::PathExists(pdf)) { | 154 file_util::PathExists(pdf)) { |
155 g_iat_patch_createdca.Patch( | 155 g_iat_patch_createdca.Patch( |
156 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); | 156 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); |
157 g_iat_patch_get_font_data.Patch( | 157 g_iat_patch_get_font_data.Patch( |
158 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); | 158 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); |
159 } | 159 } |
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 if (command_line.HasSwitch(switches::kEnableRemoting)) { | 164 |
| 165 if (!command_line.HasSwitch(switches::kSingleProcess) && |
| 166 command_line.HasSwitch(switches::kEnableRemoting)) { |
165 #if defined(USE_NSS) | 167 #if defined(USE_NSS) |
166 // 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 |
167 // 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. |
168 base::DisableNSSForkCheck(); | 170 base::DisableNSSForkCheck(); |
169 base::ForceNSSNoDBInit(); | 171 base::ForceNSSNoDBInit(); |
170 base::EnsureNSSInit(); | 172 base::EnsureNSSInit(); |
171 #else | 173 #else |
172 // TODO(bulach): implement openssl support. | 174 // TODO(bulach): implement openssl support. |
173 NOTREACHED() << "Remoting is not supported for openssl"; | 175 NOTREACHED() << "Remoting is not supported for openssl"; |
174 #endif | 176 #endif |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 338 } |
337 | 339 |
338 void RenderProcessImpl::ClearTransportDIBCache() { | 340 void RenderProcessImpl::ClearTransportDIBCache() { |
339 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 341 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
340 if (shared_mem_cache_[i]) { | 342 if (shared_mem_cache_[i]) { |
341 FreeTransportDIB(shared_mem_cache_[i]); | 343 FreeTransportDIB(shared_mem_cache_[i]); |
342 shared_mem_cache_[i] = NULL; | 344 shared_mem_cache_[i] = NULL; |
343 } | 345 } |
344 } | 346 } |
345 } | 347 } |
OLD | NEW |