Chromium Code Reviews| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 | 159 |
| 160 #if defined(OS_ANDROID) | 160 #if defined(OS_ANDROID) |
| 161 #include "content/browser/android/child_process_launcher_android.h" | 161 #include "content/browser/android/child_process_launcher_android.h" |
| 162 #include "content/browser/media/android/browser_demuxer_android.h" | 162 #include "content/browser/media/android/browser_demuxer_android.h" |
| 163 #include "content/browser/mojo/service_registrar_android.h" | 163 #include "content/browser/mojo/service_registrar_android.h" |
| 164 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" | 164 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" |
| 165 #endif | 165 #endif |
| 166 | 166 |
| 167 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
| 168 #include "base/win/scoped_com_initializer.h" | 168 #include "base/win/scoped_com_initializer.h" |
| 169 #include "base/win/windows_version.h" | |
| 169 #include "content/common/font_cache_dispatcher_win.h" | 170 #include "content/common/font_cache_dispatcher_win.h" |
| 170 #include "content/common/sandbox_win.h" | 171 #include "content/common/sandbox_win.h" |
| 172 #include "sandbox/win/src/sandbox_policy.h" | |
| 171 #include "ui/gfx/win/dpi.h" | 173 #include "ui/gfx/win/dpi.h" |
| 172 #endif | 174 #endif |
| 173 | 175 |
| 174 #if defined(ENABLE_BROWSER_CDMS) | 176 #if defined(ENABLE_BROWSER_CDMS) |
| 175 #include "content/browser/media/cdm/browser_cdm_manager.h" | 177 #include "content/browser/media/cdm/browser_cdm_manager.h" |
| 176 #endif | 178 #endif |
| 177 | 179 |
| 178 #if defined(ENABLE_PLUGINS) | 180 #if defined(ENABLE_PLUGINS) |
| 179 #include "content/browser/plugin_service_impl.h" | 181 #include "content/browser/plugin_service_impl.h" |
| 180 #endif | 182 #endif |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 319 : ipc_fd_(channel->TakeClientFileDescriptor()) | 321 : ipc_fd_(channel->TakeClientFileDescriptor()) |
| 320 #endif // OS_POSIX | 322 #endif // OS_POSIX |
| 321 {} | 323 {} |
| 322 | 324 |
| 323 ~RendererSandboxedProcessLauncherDelegate() override {} | 325 ~RendererSandboxedProcessLauncherDelegate() override {} |
| 324 | 326 |
| 325 #if defined(OS_WIN) | 327 #if defined(OS_WIN) |
| 326 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, | 328 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, |
| 327 bool* success) { | 329 bool* success) { |
| 328 AddBaseHandleClosePolicy(policy); | 330 AddBaseHandleClosePolicy(policy); |
| 331 | |
| 332 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | |
| 333 // TODO(shrikant): Check if these constants should be different across | |
| 334 // various versions of Chromium code base or could be same. | |
| 335 // If there should be different SID per channel then move this code | |
| 336 // in chrome rather than content and assign SID based on | |
| 337 // VersionInfo::GetChannel(). | |
| 338 const wchar_t kAppContainerSid[] = | |
| 339 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" | |
| 340 L"924012148-129201922"; | |
| 341 | |
|
cpu_(ooo_6.6-7.5)
2015/03/02 22:31:32
at least lets have two sids, one for chrome and on
Shrikant Kelkar
2015/03/02 23:03:44
Okay, then actually should I add policy inside
co
| |
| 342 policy->SetLowBox(kAppContainerSid); | |
| 343 } | |
| 344 | |
| 329 GetContentClient()->browser()->PreSpawnRenderer(policy, success); | 345 GetContentClient()->browser()->PreSpawnRenderer(policy, success); |
| 330 } | 346 } |
| 331 | 347 |
| 332 #elif defined(OS_POSIX) | 348 #elif defined(OS_POSIX) |
| 333 bool ShouldUseZygote() override { | 349 bool ShouldUseZygote() override { |
| 334 const base::CommandLine& browser_command_line = | 350 const base::CommandLine& browser_command_line = |
| 335 *base::CommandLine::ForCurrentProcess(); | 351 *base::CommandLine::ForCurrentProcess(); |
| 336 base::CommandLine::StringType renderer_prefix = | 352 base::CommandLine::StringType renderer_prefix = |
| 337 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 353 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
| 338 return renderer_prefix.empty(); | 354 return renderer_prefix.empty(); |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2390 if (worker_ref_count_ == 0) | 2406 if (worker_ref_count_ == 0) |
| 2391 Cleanup(); | 2407 Cleanup(); |
| 2392 } | 2408 } |
| 2393 | 2409 |
| 2394 void RenderProcessHostImpl::GetAudioOutputControllers( | 2410 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2395 const GetAudioOutputControllersCallback& callback) const { | 2411 const GetAudioOutputControllersCallback& callback) const { |
| 2396 audio_renderer_host()->GetOutputControllers(callback); | 2412 audio_renderer_host()->GetOutputControllers(callback); |
| 2397 } | 2413 } |
| 2398 | 2414 |
| 2399 } // namespace content | 2415 } // namespace content |
| OLD | NEW |