OLD | NEW |
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 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" | 5 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 #include <sys/uio.h> | 9 #include <sys/uio.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
11 #include <sys/poll.h> | 11 #include <sys/poll.h> |
12 #include <time.h> | 12 #include <time.h> |
13 | 13 |
14 #include "base/eintr_wrapper.h" | 14 #include "base/eintr_wrapper.h" |
15 #include "base/process_util.h" | 15 #include "base/process_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
18 #include "base/pickle.h" | 18 #include "base/pickle.h" |
19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
20 #include "base/unix_domain_socket_posix.h" | 20 #include "base/unix_domain_socket_posix.h" |
21 #include "chrome/common/sandbox_methods_linux.h" | 21 #include "chrome/common/sandbox_methods_linux.h" |
22 #include "webkit/api/public/gtk/WebFontInfo.h" | 22 #include "webkit/api/public/gtk/WebFontInfo.h" |
23 #include "webkit/api/public/WebData.h" | 23 #include "webkit/api/public/WebData.h" |
24 #include "webkit/api/public/WebKit.h" | 24 #include "webkit/api/public/WebKit.h" |
25 #include "webkit/api/public/WebKitClient.h" | 25 #include "webkit/api/public/WebKitClient.h" |
| 26 #include "webkit/api/public/WebStorageArea.h" |
| 27 #include "webkit/api/public/WebStorageNamespace.h" |
26 | 28 |
27 #include "SkFontHost_fontconfig_direct.h" | 29 #include "SkFontHost_fontconfig_direct.h" |
28 #include "SkFontHost_fontconfig_ipc.h" | 30 #include "SkFontHost_fontconfig_ipc.h" |
29 | 31 |
30 using WebKit::WebClipboard; | 32 using WebKit::WebClipboard; |
31 using WebKit::WebData; | 33 using WebKit::WebData; |
32 using WebKit::WebFontInfo; | 34 using WebKit::WebFontInfo; |
33 using WebKit::WebKitClient; | 35 using WebKit::WebKitClient; |
34 using WebKit::WebLocalizedString; | 36 using WebKit::WebLocalizedString; |
35 using WebKit::WebMimeRegistry; | 37 using WebKit::WebMimeRegistry; |
36 using WebKit::WebPluginInfo; | 38 using WebKit::WebPluginInfo; |
37 using WebKit::WebPluginListBuilder; | 39 using WebKit::WebPluginListBuilder; |
38 using WebKit::WebSandboxSupport; | 40 using WebKit::WebSandboxSupport; |
| 41 using WebKit::WebStorageArea; |
| 42 using WebKit::WebStorageNamespace; |
39 using WebKit::WebString; | 43 using WebKit::WebString; |
40 using WebKit::WebThemeEngine; | 44 using WebKit::WebThemeEngine; |
41 using WebKit::WebUChar; | 45 using WebKit::WebUChar; |
42 using WebKit::WebURL; | 46 using WebKit::WebURL; |
43 using WebKit::WebURLLoader; | 47 using WebKit::WebURLLoader; |
44 | 48 |
45 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC | 49 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC |
46 | 50 |
47 // BEWARE: code in this file run across *processes* (not just threads). | 51 // BEWARE: code in this file run across *processes* (not just threads). |
48 | 52 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 105 } |
102 | 106 |
103 // --------------------------------------------------------------------------- | 107 // --------------------------------------------------------------------------- |
104 // WebKitClient impl... | 108 // WebKitClient impl... |
105 | 109 |
106 virtual WebClipboard* clipboard() { return NULL; } | 110 virtual WebClipboard* clipboard() { return NULL; } |
107 virtual WebMimeRegistry* mimeRegistry() { return NULL; } | 111 virtual WebMimeRegistry* mimeRegistry() { return NULL; } |
108 virtual WebSandboxSupport* sandboxSupport() { return NULL; } | 112 virtual WebSandboxSupport* sandboxSupport() { return NULL; } |
109 virtual WebThemeEngine* themeEngine() { return NULL; } | 113 virtual WebThemeEngine* themeEngine() { return NULL; } |
110 | 114 |
| 115 virtual WebStorageNamespace* createLocalStorageNamespace( |
| 116 const WebString& path) { return 0; } |
| 117 virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; } |
| 118 |
111 virtual bool getFileSize(const WebString& path, long long& result) { | 119 virtual bool getFileSize(const WebString& path, long long& result) { |
112 return false; | 120 return false; |
113 } | 121 } |
114 | 122 |
115 virtual unsigned long long visitedLinkHash(const char*, size_t) { return 0; } | 123 virtual unsigned long long visitedLinkHash(const char*, size_t) { return 0; } |
116 virtual bool isLinkVisited(unsigned long long) { return false; } | 124 virtual bool isLinkVisited(unsigned long long) { return false; } |
117 | 125 |
118 virtual void setCookies(const WebURL&, const WebURL&, const WebString&) { } | 126 virtual void setCookies(const WebURL&, const WebURL&, const WebString&) { } |
119 virtual WebString cookies(const WebURL&, const WebURL&) { return WebString();
} | 127 virtual WebString cookies(const WebURL&, const WebURL&) { return WebString();
} |
120 | 128 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 SandboxIPCProcess handler(child_lifeline_fd, browser_socket); | 370 SandboxIPCProcess handler(child_lifeline_fd, browser_socket); |
363 handler.Run(); | 371 handler.Run(); |
364 _exit(0); | 372 _exit(0); |
365 } | 373 } |
366 } | 374 } |
367 | 375 |
368 RenderSandboxHostLinux::~RenderSandboxHostLinux() { | 376 RenderSandboxHostLinux::~RenderSandboxHostLinux() { |
369 HANDLE_EINTR(close(renderer_socket_)); | 377 HANDLE_EINTR(close(renderer_socket_)); |
370 HANDLE_EINTR(close(childs_lifeline_fd_)); | 378 HANDLE_EINTR(close(childs_lifeline_fd_)); |
371 } | 379 } |
OLD | NEW |