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

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 303293002: Initialize the bootstrap sandbox in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename constant 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/child_process_launcher.cc ('k') | content/common/sandbox_init_mac.h » ('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 #include "content/browser/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 #if defined(OS_WIN) 90 #if defined(OS_WIN)
91 virtual bool ShouldSandbox() OVERRIDE { 91 virtual bool ShouldSandbox() OVERRIDE {
92 return false; 92 return false;
93 } 93 }
94 94
95 #elif defined(OS_POSIX) 95 #elif defined(OS_POSIX)
96 virtual int GetIpcFd() OVERRIDE { 96 virtual int GetIpcFd() OVERRIDE {
97 return ipc_fd_; 97 return ipc_fd_;
98 } 98 }
99
100 #if defined(OS_MACOSX)
101 virtual SandboxType GetSandboxType() OVERRIDE {
102 return SANDBOX_TYPE_NPAPI;
103 }
104 #endif // OS_MACOSX
105
99 #endif // OS_WIN 106 #endif // OS_WIN
100 107
101 private: 108 private:
102 #if defined(OS_POSIX) 109 #if defined(OS_POSIX)
103 int ipc_fd_; 110 int ipc_fd_;
104 #endif // OS_POSIX 111 #endif // OS_POSIX
105 112
106 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate); 113 DISALLOW_COPY_AND_ASSIGN(PluginSandboxedProcessLauncherDelegate);
107 }; 114 };
108 115
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 425
419 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, 426 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request,
420 ResourceContext** resource_context, 427 ResourceContext** resource_context,
421 net::URLRequestContext** request_context) { 428 net::URLRequestContext** request_context) {
422 *resource_context = 429 *resource_context =
423 resource_context_map_[request.origin_pid].resource_context; 430 resource_context_map_[request.origin_pid].resource_context;
424 *request_context = (*resource_context)->GetRequestContext(); 431 *request_context = (*resource_context)->GetRequestContext();
425 } 432 }
426 433
427 } // namespace content 434 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/common/sandbox_init_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698