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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 2741003: Rename Chrome threads to use a "Cr" prefix. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/gpu/gpu_main.cc » ('j') | chrome/utility/utility_main.cc » ('J')
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/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // Do platform-specific things (such as finishing initializing Cocoa) 816 // Do platform-specific things (such as finishing initializing Cocoa)
817 // prior to instantiating the message loop. This could be turned into a 817 // prior to instantiating the message loop. This could be turned into a
818 // broadcast notification. 818 // broadcast notification.
819 WillInitializeMainMessageLoop(parameters); 819 WillInitializeMainMessageLoop(parameters);
820 820
821 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 821 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
822 822
823 SystemMonitor system_monitor; 823 SystemMonitor system_monitor;
824 HighResolutionTimerManager hi_res_timer_manager; 824 HighResolutionTimerManager hi_res_timer_manager;
825 825
826 std::wstring app_name = chrome::kBrowserAppName; 826 const char kThreadName[] = "CrBrowserMain";
M-A Ruel 2010/06/09 01:32:32 No, you create an array on the stack, very very sa
827 std::string thread_name_string = WideToASCII(app_name + L"_BrowserMain"); 827 PlatformThread::SetName(kThreadName);
828 828 main_message_loop.set_thread_name(kThreadName);
829 const char* thread_name = thread_name_string.c_str();
830 PlatformThread::SetName(thread_name);
831 main_message_loop.set_thread_name(thread_name);
832 829
833 // Register the main thread by instantiating it, but don't call any methods. 830 // Register the main thread by instantiating it, but don't call any methods.
834 ChromeThread main_thread(ChromeThread::UI, MessageLoop::current()); 831 ChromeThread main_thread(ChromeThread::UI, MessageLoop::current());
835 #if defined(OS_POSIX) 832 #if defined(OS_POSIX)
836 int pipefd[2]; 833 int pipefd[2];
837 int ret = pipe(pipefd); 834 int ret = pipe(pipefd);
838 if (ret < 0) { 835 if (ret < 0) {
839 PLOG(DFATAL) << "Failed to create pipe"; 836 PLOG(DFATAL) << "Failed to create pipe";
840 } else { 837 } else {
841 g_shutdown_pipe_read_fd = pipefd[0]; 838 g_shutdown_pipe_read_fd = pipefd[0];
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 1350
1354 metrics->Stop(); 1351 metrics->Stop();
1355 1352
1356 // browser_shutdown takes care of deleting browser_process, so we need to 1353 // browser_shutdown takes care of deleting browser_process, so we need to
1357 // release it. 1354 // release it.
1358 ignore_result(browser_process.release()); 1355 ignore_result(browser_process.release());
1359 browser_shutdown::Shutdown(); 1356 browser_shutdown::Shutdown();
1360 1357
1361 return result_code; 1358 return result_code;
1362 } 1359 }
OLDNEW
« no previous file with comments | « no previous file | chrome/gpu/gpu_main.cc » ('j') | chrome/utility/utility_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698