| OLD | NEW |
| 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 "app/app_paths.h" | 5 #include "app/app_paths.h" |
| 6 #include "app/app_switches.h" | 6 #include "app/app_switches.h" |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/renderer_host/render_process_host.h" | 26 #include "chrome/browser/renderer_host/render_process_host.h" |
| 27 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
| 28 #include "chrome/common/chrome_counters.h" | 28 #include "chrome/common/chrome_counters.h" |
| 29 #include "chrome/common/chrome_descriptors.h" | 29 #include "chrome/common/chrome_descriptors.h" |
| 30 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
| 31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/chrome_version_info.h" | 32 #include "chrome/common/chrome_version_info.h" |
| 33 #include "chrome/common/logging_chrome.h" | 33 #include "chrome/common/logging_chrome.h" |
| 34 #include "chrome/common/main_function_params.h" | 34 #include "chrome/common/main_function_params.h" |
| 35 #include "chrome/common/sandbox_init_wrapper.h" | 35 #include "chrome/common/sandbox_init_wrapper.h" |
| 36 #include "chrome/common/set_process_title.h" |
| 36 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
| 37 #include "ipc/ipc_switches.h" | 38 #include "ipc/ipc_switches.h" |
| 38 | 39 |
| 39 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
| 40 #include <algorithm> | 41 #include <algorithm> |
| 41 #include <atlbase.h> | 42 #include <atlbase.h> |
| 42 #include <atlapp.h> | 43 #include <atlapp.h> |
| 43 #include <malloc.h> | 44 #include <malloc.h> |
| 44 #include <new.h> | 45 #include <new.h> |
| 45 #include "sandbox/src/sandbox.h" | 46 #include "sandbox/src/sandbox.h" |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 899 |
| 899 // Note: If you are adding a new process type below, be sure to adjust the | 900 // Note: If you are adding a new process type below, be sure to adjust the |
| 900 // AdjustLinuxOOMScore function too. | 901 // AdjustLinuxOOMScore function too. |
| 901 #if defined(OS_LINUX) | 902 #if defined(OS_LINUX) |
| 902 AdjustLinuxOOMScore(process_type); | 903 AdjustLinuxOOMScore(process_type); |
| 903 // TODO(mdm): look into calling CommandLine::SetProcTitle() here instead of | 904 // TODO(mdm): look into calling CommandLine::SetProcTitle() here instead of |
| 904 // in each relevant main() function below, to fix /proc/self/exe showing up | 905 // in each relevant main() function below, to fix /proc/self/exe showing up |
| 905 // as our process name since we exec() via that to be update-safe. | 906 // as our process name since we exec() via that to be update-safe. |
| 906 #endif | 907 #endif |
| 907 | 908 |
| 909 #if defined(OS_POSIX) |
| 910 SetProcessTitleFromCommandLine(argv); |
| 911 #endif |
| 912 |
| 908 int exit_code = RunNamedProcessTypeMain(process_type, main_params); | 913 int exit_code = RunNamedProcessTypeMain(process_type, main_params); |
| 909 | 914 |
| 910 if (SubprocessNeedsResourceBundle(process_type)) | 915 if (SubprocessNeedsResourceBundle(process_type)) |
| 911 ResourceBundle::CleanupSharedInstance(); | 916 ResourceBundle::CleanupSharedInstance(); |
| 912 | 917 |
| 913 LowLevelShutdown(); | 918 LowLevelShutdown(); |
| 914 | 919 |
| 915 return exit_code; | 920 return exit_code; |
| 916 } | 921 } |
| OLD | NEW |