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 <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/allocator/allocator_extension.h" | 10 #include "base/allocator/allocator_extension.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) | 288 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) |
289 // On platforms where we use system NSS shared libraries, | 289 // On platforms where we use system NSS shared libraries, |
290 // initialize NSS now because it won't be able to load the .so's | 290 // initialize NSS now because it won't be able to load the .so's |
291 // after we engage the sandbox. | 291 // after we engage the sandbox. |
292 if (!command_line.HasSwitch(switches::kSingleProcess)) | 292 if (!command_line.HasSwitch(switches::kSingleProcess)) |
293 crypto::InitNSSSafely(); | 293 crypto::InitNSSSafely(); |
294 #elif defined(OS_WIN) | 294 #elif defined(OS_WIN) |
295 // crypt32.dll is used to decode X509 certificates for Chromoting. | 295 // crypt32.dll is used to decode X509 certificates for Chromoting. |
296 // Only load this library when the feature is enabled. | 296 // Only load this library when the feature is enabled. |
297 std::string error; | 297 base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), NULL); |
298 base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), &error); | |
299 #endif | 298 #endif |
300 // Setup initial set of crash dump data for Field Trials in this renderer. | 299 // Setup initial set of crash dump data for Field Trials in this renderer. |
301 chrome_variations::SetChildProcessLoggingVariationList(); | 300 chrome_variations::SetChildProcessLoggingVariationList(); |
302 } | 301 } |
303 | 302 |
304 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() { | 303 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() { |
305 } | 304 } |
306 | 305 |
307 bool ChromeRenderProcessObserver::OnControlMessageReceived( | 306 bool ChromeRenderProcessObserver::OnControlMessageReceived( |
308 const IPC::Message& message) { | 307 const IPC::Message& message) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 if (clear_cache_pending_ && webkit_initialized_) { | 406 if (clear_cache_pending_ && webkit_initialized_) { |
408 clear_cache_pending_ = false; | 407 clear_cache_pending_ = false; |
409 WebCache::clear(); | 408 WebCache::clear(); |
410 } | 409 } |
411 } | 410 } |
412 | 411 |
413 const RendererContentSettingRules* | 412 const RendererContentSettingRules* |
414 ChromeRenderProcessObserver::content_setting_rules() const { | 413 ChromeRenderProcessObserver::content_setting_rules() const { |
415 return &content_setting_rules_; | 414 return &content_setting_rules_; |
416 } | 415 } |
OLD | NEW |