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

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

Issue 6538111: Move the rest of the core files in chrome\browser to content\browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/zygote_host_linux.h ('k') | content/browser/zygote_main_linux.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/zygote_host_linux.h" 5 #include "content/browser/zygote_host_linux.h"
6 6
7 #include <sys/socket.h> 7 #include <sys/socket.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/eintr_wrapper.h" 13 #include "base/eintr_wrapper.h"
14 #include "base/environment.h" 14 #include "base/environment.h"
15 #include "base/linux_util.h" 15 #include "base/linux_util.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/pickle.h" 18 #include "base/pickle.h"
19 #include "base/process_util.h" 19 #include "base/process_util.h"
20 #include "base/string_number_conversions.h" 20 #include "base/string_number_conversions.h"
21 #include "base/string_util.h" 21 #include "base/string_util.h"
22 #include "base/scoped_ptr.h" 22 #include "base/scoped_ptr.h"
23 #include "base/utf_string_conversions.h" 23 #include "base/utf_string_conversions.h"
24 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h"
25 #include "chrome/common/chrome_constants.h" 24 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/process_watcher.h" 26 #include "chrome/common/process_watcher.h"
28 #include "chrome/common/result_codes.h" 27 #include "chrome/common/result_codes.h"
29 #include "chrome/common/unix_domain_socket_posix.h" 28 #include "chrome/common/unix_domain_socket_posix.h"
29 #include "content/browser/renderer_host/render_sandbox_host_linux.h"
30 #include "sandbox/linux/suid/suid_unsafe_environment_variables.h" 30 #include "sandbox/linux/suid/suid_unsafe_environment_variables.h"
31 31
32 static void SaveSUIDUnsafeEnvironmentVariables() { 32 static void SaveSUIDUnsafeEnvironmentVariables() {
33 // The ELF loader will clear many environment variables so we save them to 33 // The ELF loader will clear many environment variables so we save them to
34 // different names here so that the SUID sandbox can resolve them for the 34 // different names here so that the SUID sandbox can resolve them for the
35 // renderer. 35 // renderer.
36 36
37 for (unsigned i = 0; kSUIDUnsafeEnvironmentVariables[i]; ++i) { 37 for (unsigned i = 0; kSUIDUnsafeEnvironmentVariables[i]; ++i) {
38 const char* const envvar = kSUIDUnsafeEnvironmentVariables[i]; 38 const char* const envvar = kSUIDUnsafeEnvironmentVariables[i];
39 char* const saved_envvar = SandboxSavedEnvironmentVariable(envvar); 39 char* const saved_envvar = SandboxSavedEnvironmentVariable(envvar);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 !read_pickle.ReadInt(&iter, &tmp_exit_code)) { 353 !read_pickle.ReadInt(&iter, &tmp_exit_code)) {
354 LOG(WARNING) << "Error parsing GetTerminationStatus response from zygote."; 354 LOG(WARNING) << "Error parsing GetTerminationStatus response from zygote.";
355 return base::TERMINATION_STATUS_NORMAL_TERMINATION; 355 return base::TERMINATION_STATUS_NORMAL_TERMINATION;
356 } 356 }
357 357
358 if (exit_code) 358 if (exit_code)
359 *exit_code = tmp_exit_code; 359 *exit_code = tmp_exit_code;
360 360
361 return static_cast<base::TerminationStatus>(status); 361 return static_cast<base::TerminationStatus>(status);
362 } 362 }
OLDNEW
« no previous file with comments | « content/browser/zygote_host_linux.h ('k') | content/browser/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698