| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/renderer/cast_content_renderer_client.h" | 5 #include "chromecast/renderer/cast_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <sys/sysinfo.h> | 7 #include <sys/sysinfo.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/memory_pressure_listener.h" | 10 #include "base/memory/memory_pressure_listener.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } // namespace | 88 } // namespace |
| 89 | 89 |
| 90 CastContentRendererClient::CastContentRendererClient() { | 90 CastContentRendererClient::CastContentRendererClient() { |
| 91 } | 91 } |
| 92 | 92 |
| 93 CastContentRendererClient::~CastContentRendererClient() { | 93 CastContentRendererClient::~CastContentRendererClient() { |
| 94 } | 94 } |
| 95 | 95 |
| 96 void CastContentRendererClient::RenderThreadStarted() { | 96 void CastContentRendererClient::RenderThreadStarted() { |
| 97 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 97 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 98 #if defined(USE_NSS) | 98 #if defined(USE_NSS_CERTS) |
| 99 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652. | 99 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652. |
| 100 // | 100 // |
| 101 // On platforms where the system NSS shared libraries are used, | 101 // On platforms where the system NSS shared libraries are used, |
| 102 // initialize NSS now because it won't be able to load the .so's | 102 // initialize NSS now because it won't be able to load the .so's |
| 103 // after entering the sandbox. | 103 // after entering the sandbox. |
| 104 if (!command_line->HasSwitch(switches::kSingleProcess)) | 104 if (!command_line->HasSwitch(switches::kSingleProcess)) |
| 105 crypto::InitNSSSafely(); | 105 crypto::InitNSSSafely(); |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 #if defined(ARCH_CPU_ARM_FAMILY) && !defined(OS_ANDROID) | 108 #if defined(ARCH_CPU_ARM_FAMILY) && !defined(OS_ANDROID) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 closure.Run(); | 189 closure.Run(); |
| 190 return; | 190 return; |
| 191 } | 191 } |
| 192 | 192 |
| 193 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. | 193 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. |
| 194 new CastMediaLoadDeferrer(render_frame, closure); | 194 new CastMediaLoadDeferrer(render_frame, closure); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace shell | 197 } // namespace shell |
| 198 } // namespace chromecast | 198 } // namespace chromecast |
| OLD | NEW |