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

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

Issue 17451017: Process names, and predictable thread and process ordering in about:tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/browser_main.h" 5 #include "content/browser/browser_main.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "content/public/browser/browser_main_runner.h" 8 #include "content/public/browser/browser_main_runner.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Main routine for running as the Browser process. 12 // Main routine for running as the Browser process.
13 int BrowserMain(const MainFunctionParams& parameters) { 13 int BrowserMain(const MainFunctionParams& parameters) {
14 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, ""); 14 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, "");
15 base::debug::TraceLog::GetInstance()->SetProcessLabel(0, "Browser");
16 base::debug::TraceLog::GetInstance()->SetProcessSortIndex(-1);
15 17
16 scoped_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create()); 18 scoped_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create());
17 19
18 int exit_code = main_runner->Initialize(parameters); 20 int exit_code = main_runner->Initialize(parameters);
19 if (exit_code >= 0) 21 if (exit_code >= 0)
20 return exit_code; 22 return exit_code;
21 23
22 exit_code = main_runner->Run(); 24 exit_code = main_runner->Run();
23 25
24 main_runner->Shutdown(); 26 main_runner->Shutdown();
25 27
26 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 28 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
27 29
28 return exit_code; 30 return exit_code;
29 } 31 }
30 32
31 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | content/gpu/gpu_main.cc » ('j') | content/gpu/gpu_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698