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

Side by Side Diff: chrome/plugin/plugin_main.cc

Issue 523106: Merge 35441 - Linux: use readlink() and prctl() in SetProcTitle() to fix "exe... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 10 years, 11 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 | « base/setproctitle_linux.h ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #endif 9 #endif
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Initialize the SystemMonitor 92 // Initialize the SystemMonitor
93 base::SystemMonitor::Start(); 93 base::SystemMonitor::Start();
94 94
95 #if defined(OS_MACOSX) 95 #if defined(OS_MACOSX)
96 TrimInterposeEnvironment(); 96 TrimInterposeEnvironment();
97 #endif 97 #endif
98 98
99 const CommandLine& parsed_command_line = parameters.command_line_; 99 const CommandLine& parsed_command_line = parameters.command_line_;
100 100
101 #if defined(OS_WIN) 101 #if defined(OS_LINUX)
102 // On Linux we exec ourselves from /proc/self/exe, but that makes the
103 // process name that shows up in "ps" etc. for plugins show as "exe"
104 // instead of "chrome" or something reasonable. Try to fix it.
105 CommandLine::SetProcTitle();
106 #elif defined(OS_WIN)
102 sandbox::TargetServices* target_services = 107 sandbox::TargetServices* target_services =
103 parameters.sandbox_info_.TargetServices(); 108 parameters.sandbox_info_.TargetServices();
104 109
105 CoInitialize(NULL); 110 CoInitialize(NULL);
106 DLOG(INFO) << "Started plugin with " << 111 DLOG(INFO) << "Started plugin with " <<
107 parsed_command_line.command_line_string(); 112 parsed_command_line.command_line_string();
108 113
109 HMODULE sandbox_test_module = NULL; 114 HMODULE sandbox_test_module = NULL;
110 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || 115 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) ||
111 !parsed_command_line.HasSwitch(switches::kSafePlugins); 116 !parsed_command_line.HasSwitch(switches::kSafePlugins);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 156
152 MessageLoop::current()->Run(); 157 MessageLoop::current()->Run();
153 } 158 }
154 159
155 #if defined(OS_WIN) 160 #if defined(OS_WIN)
156 CoUninitialize(); 161 CoUninitialize();
157 #endif 162 #endif
158 163
159 return 0; 164 return 0;
160 } 165 }
OLDNEW
« no previous file with comments | « base/setproctitle_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698