| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); | 227 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size())); |
| 228 } | 228 } |
| 229 | 229 |
| 230 RenderThread* thread = RenderThread::Get(); | 230 RenderThread* thread = RenderThread::Get(); |
| 231 resource_delegate_.reset(new RendererResourceDelegate()); | 231 resource_delegate_.reset(new RendererResourceDelegate()); |
| 232 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); | 232 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); |
| 233 | 233 |
| 234 // Configure modules that need access to resources. | 234 // Configure modules that need access to resources. |
| 235 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 235 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 236 | 236 |
| 237 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) | 237 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS_CERTS) |
| 238 // On platforms where we use system NSS shared libraries, | 238 // On platforms where we use system NSS shared libraries, |
| 239 // initialize NSS now because it won't be able to load the .so's | 239 // initialize NSS now because it won't be able to load the .so's |
| 240 // after we engage the sandbox. | 240 // after we engage the sandbox. |
| 241 if (!command_line.HasSwitch(switches::kSingleProcess)) | 241 if (!command_line.HasSwitch(switches::kSingleProcess)) |
| 242 crypto::InitNSSSafely(); | 242 crypto::InitNSSSafely(); |
| 243 #elif defined(OS_WIN) | 243 #elif defined(OS_WIN) |
| 244 // crypt32.dll is used to decode X509 certificates for Chromoting. | 244 // crypt32.dll is used to decode X509 certificates for Chromoting. |
| 245 // Only load this library when the feature is enabled. | 245 // Only load this library when the feature is enabled. |
| 246 base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), NULL); | 246 base::LoadNativeLibrary(base::FilePath(L"crypt32.dll"), NULL); |
| 247 #endif | 247 #endif |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 ChromeRenderProcessObserver::content_setting_rules() const { | 329 ChromeRenderProcessObserver::content_setting_rules() const { |
| 330 return &content_setting_rules_; | 330 return &content_setting_rules_; |
| 331 } | 331 } |
| 332 | 332 |
| 333 void ChromeRenderProcessObserver::OnFieldTrialGroupFinalized( | 333 void ChromeRenderProcessObserver::OnFieldTrialGroupFinalized( |
| 334 const std::string& trial_name, | 334 const std::string& trial_name, |
| 335 const std::string& group_name) { | 335 const std::string& group_name) { |
| 336 content::RenderThread::Get()->Send( | 336 content::RenderThread::Get()->Send( |
| 337 new ChromeViewHostMsg_FieldTrialActivated(trial_name)); | 337 new ChromeViewHostMsg_FieldTrialActivated(trial_name)); |
| 338 } | 338 } |
| OLD | NEW |