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

Side by Side Diff: chrome/browser/renderer_host/render_sandbox_host_linux.h

Issue 359001: Revert 30938 - Add support for getting the real process id from within the su... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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
Property Changes:
Deleted: svn:eol-style
- LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC 5 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
6 6
7 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ 7 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
8 #define CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ 8 #define CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
9 9
10 #include <string>
11
12 #include "base/logging.h"
13 #include "base/singleton.h" 10 #include "base/singleton.h"
14 11
15 // This is a singleton object which handles sandbox requests from the 12 // This is a singleton object which handles sandbox requests from the
16 // renderers. 13 // renderers.
17 class RenderSandboxHostLinux { 14 class RenderSandboxHostLinux {
18 public: 15 public:
19 // Get the file descriptor which renderers should be given in order to signal 16 // Get the file descriptor which renderers should be given in order to signal
20 // crashes to the browser. 17 // crashes to the browser.
21 int GetRendererSocket() const { 18 int GetRendererSocket() const { return renderer_socket_; }
22 DCHECK(init_); 19 pid_t pid() const { return pid_; }
23 return renderer_socket_;
24 }
25 pid_t pid() const {
26 DCHECK(init_);
27 return pid_;
28 }
29 void Init(const std::string& sandbox_path);
30 20
31 private: 21 private:
32 friend struct DefaultSingletonTraits<RenderSandboxHostLinux>; 22 friend struct DefaultSingletonTraits<RenderSandboxHostLinux>;
33 // This object must be constructed on the main thread. 23 // This object must be constructed on the main thread.
34 RenderSandboxHostLinux(); 24 RenderSandboxHostLinux();
35 ~RenderSandboxHostLinux(); 25 ~RenderSandboxHostLinux();
36 26
37 bool init_;
38 int renderer_socket_; 27 int renderer_socket_;
39 int childs_lifeline_fd_; 28 int childs_lifeline_fd_;
40 pid_t pid_; 29 pid_t pid_;
41 30
42 DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux); 31 DISALLOW_EVIL_CONSTRUCTORS(RenderSandboxHostLinux);
43 }; 32 };
44 33
45 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_ 34 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/render_sandbox_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698