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

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

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 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
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/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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 renderer_socket_ = fds[0]; 739 renderer_socket_ = fds[0];
740 const int browser_socket = fds[1]; 740 const int browser_socket = fds[1];
741 741
742 int pipefds[2]; 742 int pipefds[2];
743 CHECK(0 == pipe(pipefds)); 743 CHECK(0 == pipe(pipefds));
744 const int child_lifeline_fd = pipefds[0]; 744 const int child_lifeline_fd = pipefds[0];
745 childs_lifeline_fd_ = pipefds[1]; 745 childs_lifeline_fd_ = pipefds[1];
746 746
747 // We need to be monothreaded before we fork(). 747 // We need to be monothreaded before we fork().
748 #if !defined(TOOLKIT_GTK) && !defined(THREAD_SANITIZER) 748 #if !defined(THREAD_SANITIZER)
749 // Exclude gtk port as TestSuite in base/tests/test_suite.cc is calling
750 // gtk_init.
751 // TODO(oshima): Remove ifdef when above issues are resolved.
752 DCHECK_EQ(1, base::GetNumberOfThreads(base::GetCurrentProcessHandle())); 749 DCHECK_EQ(1, base::GetNumberOfThreads(base::GetCurrentProcessHandle()));
753 #endif // !defined(TOOLKIT_GTK) && !defined(THREAD_SANITIZER) 750 #endif // !defined(THREAD_SANITIZER)
754 pid_ = fork(); 751 pid_ = fork();
755 if (pid_ == 0) { 752 if (pid_ == 0) {
756 if (IGNORE_EINTR(close(fds[0])) < 0) 753 if (IGNORE_EINTR(close(fds[0])) < 0)
757 DPLOG(ERROR) << "close"; 754 DPLOG(ERROR) << "close";
758 if (IGNORE_EINTR(close(pipefds[1])) < 0) 755 if (IGNORE_EINTR(close(pipefds[1])) < 0)
759 DPLOG(ERROR) << "close"; 756 DPLOG(ERROR) << "close";
760 757
761 SandboxIPCProcess handler(child_lifeline_fd, browser_socket, sandbox_path); 758 SandboxIPCProcess handler(child_lifeline_fd, browser_socket, sandbox_path);
762 handler.Run(); 759 handler.Run();
763 _exit(0); 760 _exit(0);
764 } 761 }
765 } 762 }
766 763
767 RenderSandboxHostLinux::~RenderSandboxHostLinux() { 764 RenderSandboxHostLinux::~RenderSandboxHostLinux() {
768 if (initialized_) { 765 if (initialized_) {
769 if (IGNORE_EINTR(close(renderer_socket_)) < 0) 766 if (IGNORE_EINTR(close(renderer_socket_)) < 0)
770 PLOG(ERROR) << "close"; 767 PLOG(ERROR) << "close";
771 if (IGNORE_EINTR(close(childs_lifeline_fd_)) < 0) 768 if (IGNORE_EINTR(close(childs_lifeline_fd_)) < 0)
772 PLOG(ERROR) << "close"; 769 PLOG(ERROR) << "close";
773 } 770 }
774 } 771 }
775 772
776 } // namespace content 773 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/browser/renderer_host/render_widget_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698