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

Side by Side Diff: chrome/gpu/gpu_main.cc

Issue 6002013: Move the SetProcTitle code out of base and into chrome/common. This is only... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/common/set_process_title_linux.cc ('k') | chrome/plugin/plugin_main.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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "app/gfx/gl/gl_context.h" 8 #include "app/gfx/gl/gl_context.h"
9 #include "app/gfx/gl/gl_implementation.h" 9 #include "app/gfx/gl/gl_implementation.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Main function for starting the Gpu process. 58 // Main function for starting the Gpu process.
59 int GpuMain(const MainFunctionParams& parameters) { 59 int GpuMain(const MainFunctionParams& parameters) {
60 base::Time start_time = base::Time::Now(); 60 base::Time start_time = base::Time::Now();
61 61
62 #if defined(USE_LINUX_BREAKPAD) 62 #if defined(USE_LINUX_BREAKPAD)
63 // Needs to be called after we have chrome::DIR_USER_DATA. 63 // Needs to be called after we have chrome::DIR_USER_DATA.
64 InitCrashReporter(); 64 InitCrashReporter();
65 #endif 65 #endif
66 66
67 #if defined(OS_LINUX)
68 // On Linux we exec ourselves from /proc/self/exe, but that makes the
69 // process name that shows up in "ps" etc. for the GPU process show as
70 // "exe" instead of "chrome" or something reasonable. Try to fix it.
71 CommandLine::SetProcTitle();
72 #endif
73
74 const CommandLine& command_line = parameters.command_line_; 67 const CommandLine& command_line = parameters.command_line_;
75 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { 68 if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
76 ChildProcess::WaitForDebugger(L"Gpu"); 69 ChildProcess::WaitForDebugger(L"Gpu");
77 } 70 }
78 71
79 #if defined(OS_MACOSX) 72 #if defined(OS_MACOSX)
80 chrome_application_mac::RegisterCrApp(); 73 chrome_application_mac::RegisterCrApp();
81 #endif 74 #endif
82 75
83 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 76 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 watchdog_thread->Start(); 149 watchdog_thread->Start();
157 } 150 }
158 151
159 main_message_loop.Run(); 152 main_message_loop.Run();
160 153
161 if (enable_watchdog) 154 if (enable_watchdog)
162 watchdog_thread->Stop(); 155 watchdog_thread->Stop();
163 156
164 return 0; 157 return 0;
165 } 158 }
OLDNEW
« no previous file with comments | « chrome/common/set_process_title_linux.cc ('k') | chrome/plugin/plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698