| OLD | NEW |
| 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/renderer_host/render_sandbox_host_linux.h" | 5 #include "content/browser/renderer_host/render_sandbox_host_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <fontconfig/fontconfig.h> | 8 #include <fontconfig/fontconfig.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <sys/poll.h> | 10 #include <sys/poll.h> |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 | 657 |
| 658 const int lifeline_fd_; | 658 const int lifeline_fd_; |
| 659 const int browser_socket_; | 659 const int browser_socket_; |
| 660 std::vector<std::string> sandbox_cmd_; | 660 std::vector<std::string> sandbox_cmd_; |
| 661 scoped_ptr<WebKitPlatformSupportImpl> webkit_platform_support_; | 661 scoped_ptr<WebKitPlatformSupportImpl> webkit_platform_support_; |
| 662 SkTDArray<SkString*> paths_; | 662 SkTDArray<SkString*> paths_; |
| 663 }; | 663 }; |
| 664 | 664 |
| 665 SandboxIPCProcess::~SandboxIPCProcess() { | 665 SandboxIPCProcess::~SandboxIPCProcess() { |
| 666 paths_.deleteAll(); | 666 paths_.deleteAll(); |
| 667 if (webkit_platform_support_.get()) | 667 if (webkit_platform_support_) |
| 668 WebKit::shutdown(); | 668 WebKit::shutdown(); |
| 669 } | 669 } |
| 670 | 670 |
| 671 void SandboxIPCProcess::EnsureWebKitInitialized() { | 671 void SandboxIPCProcess::EnsureWebKitInitialized() { |
| 672 if (webkit_platform_support_.get()) | 672 if (webkit_platform_support_) |
| 673 return; | 673 return; |
| 674 webkit_platform_support_.reset(new WebKitPlatformSupportImpl); | 674 webkit_platform_support_.reset(new WebKitPlatformSupportImpl); |
| 675 WebKit::initializeWithoutV8(webkit_platform_support_.get()); | 675 WebKit::initializeWithoutV8(webkit_platform_support_.get()); |
| 676 } | 676 } |
| 677 | 677 |
| 678 // ----------------------------------------------------------------------------- | 678 // ----------------------------------------------------------------------------- |
| 679 | 679 |
| 680 // Runs on the main thread at startup. | 680 // Runs on the main thread at startup. |
| 681 RenderSandboxHostLinux::RenderSandboxHostLinux() | 681 RenderSandboxHostLinux::RenderSandboxHostLinux() |
| 682 : initialized_(false), | 682 : initialized_(false), |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 RenderSandboxHostLinux::~RenderSandboxHostLinux() { | 734 RenderSandboxHostLinux::~RenderSandboxHostLinux() { |
| 735 if (initialized_) { | 735 if (initialized_) { |
| 736 if (HANDLE_EINTR(close(renderer_socket_)) < 0) | 736 if (HANDLE_EINTR(close(renderer_socket_)) < 0) |
| 737 PLOG(ERROR) << "close"; | 737 PLOG(ERROR) << "close"; |
| 738 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) | 738 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) |
| 739 PLOG(ERROR) << "close"; | 739 PLOG(ERROR) << "close"; |
| 740 } | 740 } |
| 741 } | 741 } |
| 742 | 742 |
| 743 } // namespace content | 743 } // namespace content |
| OLD | NEW |