OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/renderer/chrome_render_process_observer.h" | 5 #include "chrome/renderer/chrome_render_process_observer.h" |
6 | 6 |
7 #include "base/allocator/allocator_extension.h" | 7 #include "base/allocator/allocator_extension.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && | 179 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
180 file_util::PathExists(pdf)) { | 180 file_util::PathExists(pdf)) { |
181 g_iat_patch_createdca.Patch( | 181 g_iat_patch_createdca.Patch( |
182 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); | 182 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); |
183 g_iat_patch_get_font_data.Patch( | 183 g_iat_patch_get_font_data.Patch( |
184 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); | 184 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); |
185 } | 185 } |
186 #endif | 186 #endif |
187 | 187 |
188 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) | 188 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) |
189 // Remoting requires NSS to function properly. | 189 // On Linux, NSS uses system libraries, so the .so's must be loaded. |
wtc
2012/06/14 21:28:48
Nit: this should read:
On Linux, we use system N
ddorwin
2012/06/14 22:01:55
Done.
| |
190 if (!command_line.HasSwitch(switches::kSingleProcess)) { | 190 if (!command_line.HasSwitch(switches::kSingleProcess)) { |
191 // We are going to fork to engage the sandbox and we have not loaded | 191 // We are going to fork to engage the sandbox and we have not loaded |
192 // any security modules so it is safe to disable the fork check in NSS. | 192 // any security modules so it is safe to disable the fork check in NSS. |
193 crypto::DisableNSSForkCheck(); | 193 crypto::DisableNSSForkCheck(); |
194 crypto::ForceNSSNoDBInit(); | 194 crypto::ForceNSSNoDBInit(); |
195 crypto::EnsureNSSInit(); | 195 crypto::EnsureNSSInit(); |
196 } | 196 } |
197 #elif defined(OS_WIN) | 197 #elif defined(OS_WIN) |
198 // crypt32.dll is used to decode X509 certificates for Chromoting. | 198 // crypt32.dll is used to decode X509 certificates for Chromoting. |
199 // Only load this library when the feature is enabled. | 199 // Only load this library when the feature is enabled. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
343 if (clear_cache_pending_) { | 343 if (clear_cache_pending_) { |
344 clear_cache_pending_ = false; | 344 clear_cache_pending_ = false; |
345 WebCache::clear(); | 345 WebCache::clear(); |
346 } | 346 } |
347 } | 347 } |
348 | 348 |
349 const RendererContentSettingRules* | 349 const RendererContentSettingRules* |
350 ChromeRenderProcessObserver::content_setting_rules() const { | 350 ChromeRenderProcessObserver::content_setting_rules() const { |
351 return &content_setting_rules_; | 351 return &content_setting_rules_; |
352 } | 352 } |
OLD | NEW |