Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Side by Side Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 10543146: Use NSS for symmetric key crypto operations on Windows and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Windows shared library build (also need NSS DEPS roll) Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | crypto/crypto.gyp » ('j') | crypto/crypto.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
Nick Bray 2012/06/14 20:37:06 On a side note, ChromeOS uses a patched version of
Ryan Sleevi 2012/06/14 20:54:48 Do you have an example of this? Chrome on Linux/C
190 // (On all platforms, RNG is primed in WebKit (for window.crypto.getRandom()).
Ryan Sleevi 2012/06/14 19:35:26 You can remove this second comment.
ddorwin 2012/06/14 20:44:19 Done.
190 if (!command_line.HasSwitch(switches::kSingleProcess)) { 191 if (!command_line.HasSwitch(switches::kSingleProcess)) {
191 // We are going to fork to engage the sandbox and we have not loaded 192 // 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. 193 // any security modules so it is safe to disable the fork check in NSS.
193 crypto::DisableNSSForkCheck(); 194 crypto::DisableNSSForkCheck();
194 crypto::ForceNSSNoDBInit(); 195 crypto::ForceNSSNoDBInit();
195 crypto::EnsureNSSInit(); 196 crypto::EnsureNSSInit();
196 } 197 }
197 #elif defined(OS_WIN) 198 #elif defined(OS_WIN)
198 // crypt32.dll is used to decode X509 certificates for Chromoting. 199 // crypt32.dll is used to decode X509 certificates for Chromoting.
199 // Only load this library when the feature is enabled. 200 // Only load this library when the feature is enabled.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 if (clear_cache_pending_) { 344 if (clear_cache_pending_) {
344 clear_cache_pending_ = false; 345 clear_cache_pending_ = false;
345 WebCache::clear(); 346 WebCache::clear();
346 } 347 }
347 } 348 }
348 349
349 const RendererContentSettingRules* 350 const RendererContentSettingRules*
350 ChromeRenderProcessObserver::content_setting_rules() const { 351 ChromeRenderProcessObserver::content_setting_rules() const {
351 return &content_setting_rules_; 352 return &content_setting_rules_;
352 } 353 }
OLDNEW
« no previous file with comments | « no previous file | crypto/crypto.gyp » ('j') | crypto/crypto.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698