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

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

Issue 341073005: Define a bootstrap sandbox policy for renderer processes and enable it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Allow com.apple.windowserver.active Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | no next file » | 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 #endif 163 #endif
164 164
165 #if defined(OS_WIN) 165 #if defined(OS_WIN)
166 #include "base/strings/string_number_conversions.h" 166 #include "base/strings/string_number_conversions.h"
167 #include "base/win/scoped_com_initializer.h" 167 #include "base/win/scoped_com_initializer.h"
168 #include "content/common/font_cache_dispatcher_win.h" 168 #include "content/common/font_cache_dispatcher_win.h"
169 #include "content/common/sandbox_win.h" 169 #include "content/common/sandbox_win.h"
170 #include "ui/gfx/win/dpi.h" 170 #include "ui/gfx/win/dpi.h"
171 #endif 171 #endif
172 172
173 #if defined(OS_MACOSX)
174 #include "content/public/common/sandbox_type_mac.h"
175 #endif
176
173 #if defined(ENABLE_WEBRTC) 177 #if defined(ENABLE_WEBRTC)
174 #include "content/browser/media/webrtc_internals.h" 178 #include "content/browser/media/webrtc_internals.h"
175 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" 179 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h"
176 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" 180 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h"
177 #include "content/common/media/aec_dump_messages.h" 181 #include "content/common/media/aec_dump_messages.h"
178 #include "content/common/media/media_stream_messages.h" 182 #include "content/common/media/media_stream_messages.h"
179 #endif 183 #endif
180 184
181 extern bool g_exited_main_message_loop; 185 extern bool g_exited_main_message_loop;
182 186
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 #elif defined(OS_POSIX) 326 #elif defined(OS_POSIX)
323 virtual bool ShouldUseZygote() OVERRIDE { 327 virtual bool ShouldUseZygote() OVERRIDE {
324 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 328 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
325 CommandLine::StringType renderer_prefix = 329 CommandLine::StringType renderer_prefix =
326 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); 330 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
327 return renderer_prefix.empty(); 331 return renderer_prefix.empty();
328 } 332 }
329 virtual int GetIpcFd() OVERRIDE { 333 virtual int GetIpcFd() OVERRIDE {
330 return ipc_fd_; 334 return ipc_fd_;
331 } 335 }
336 #if defined(OS_MACOSX)
337 virtual SandboxType GetSandboxType() OVERRIDE {
338 return SANDBOX_TYPE_RENDERER;
339 }
340 #endif
332 #endif // OS_WIN 341 #endif // OS_WIN
333 342
334 private: 343 private:
335 #if defined(OS_POSIX) 344 #if defined(OS_POSIX)
336 int ipc_fd_; 345 int ipc_fd_;
337 #endif // OS_POSIX 346 #endif // OS_POSIX
338 }; 347 };
339 348
340 #if defined(OS_MACOSX) 349 #if defined(OS_MACOSX)
341 void AddBooleanValue(CFMutableDictionaryRef dictionary, 350 void AddBooleanValue(CFMutableDictionaryRef dictionary,
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 void RenderProcessHostImpl::GpuMemoryBufferAllocated( 2367 void RenderProcessHostImpl::GpuMemoryBufferAllocated(
2359 IPC::Message* reply, 2368 IPC::Message* reply,
2360 const gfx::GpuMemoryBufferHandle& handle) { 2369 const gfx::GpuMemoryBufferHandle& handle) {
2361 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2370 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2362 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, 2371 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply,
2363 handle); 2372 handle);
2364 Send(reply); 2373 Send(reply);
2365 } 2374 }
2366 2375
2367 } // namespace content 2376 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698