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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1149143002: Merge M43: Enable appcontainer on M43 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | content/common/sandbox_win.cc » ('j') | no next file with comments »
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 // 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 #endif // OS_POSIX 328 #endif // OS_POSIX
329 {} 329 {}
330 330
331 ~RendererSandboxedProcessLauncherDelegate() override {} 331 ~RendererSandboxedProcessLauncherDelegate() override {}
332 332
333 #if defined(OS_WIN) 333 #if defined(OS_WIN)
334 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, 334 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy,
335 bool* success) { 335 bool* success) {
336 AddBaseHandleClosePolicy(policy); 336 AddBaseHandleClosePolicy(policy);
337 337
338 if (base::win::GetVersion() == base::win::VERSION_WIN8 ||
339 base::win::GetVersion() == base::win::VERSION_WIN8_1) {
340 // TODO(shrikant): Check if these constants should be different across
341 // various versions of Chromium code base or could be same.
342 // If there should be different SID per channel then move this code
343 // in chrome rather than content and assign SID based on
344 // VersionInfo::GetChannel().
345 const wchar_t kAppContainerSid[] =
346 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-"
347 L"924012148-129201922";
348
349 policy->SetLowBox(kAppContainerSid);
350 }
351
338 GetContentClient()->browser()->PreSpawnRenderer(policy, success); 352 GetContentClient()->browser()->PreSpawnRenderer(policy, success);
339 } 353 }
340 354
341 #elif defined(OS_POSIX) 355 #elif defined(OS_POSIX)
342 bool ShouldUseZygote() override { 356 bool ShouldUseZygote() override {
343 const base::CommandLine& browser_command_line = 357 const base::CommandLine& browser_command_line =
344 *base::CommandLine::ForCurrentProcess(); 358 *base::CommandLine::ForCurrentProcess();
345 base::CommandLine::StringType renderer_prefix = 359 base::CommandLine::StringType renderer_prefix =
346 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); 360 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
347 return renderer_prefix.empty(); 361 return renderer_prefix.empty();
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 if (worker_ref_count_ == 0) 2474 if (worker_ref_count_ == 0)
2461 Cleanup(); 2475 Cleanup();
2462 } 2476 }
2463 2477
2464 void RenderProcessHostImpl::GetAudioOutputControllers( 2478 void RenderProcessHostImpl::GetAudioOutputControllers(
2465 const GetAudioOutputControllersCallback& callback) const { 2479 const GetAudioOutputControllersCallback& callback) const {
2466 audio_renderer_host()->GetOutputControllers(callback); 2480 audio_renderer_host()->GetOutputControllers(callback);
2467 } 2481 }
2468 2482
2469 } // namespace content 2483 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698