OLD | NEW |
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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "content/common/content_constants_internal.h" | 10 #include "content/common/content_constants_internal.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 // Main routine for running as the Browser process. | 32 // Main routine for running as the Browser process. |
33 int BrowserMain(const MainFunctionParams& parameters) { | 33 int BrowserMain(const MainFunctionParams& parameters) { |
34 ScopedBrowserMainEvent scoped_browser_main_event; | 34 ScopedBrowserMainEvent scoped_browser_main_event; |
35 | 35 |
36 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser"); | 36 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser"); |
37 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( | 37 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( |
38 kTraceEventBrowserProcessSortIndex); | 38 kTraceEventBrowserProcessSortIndex); |
39 | |
40 std::unique_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create()); | 39 std::unique_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create()); |
41 | 40 |
42 int exit_code = main_runner->Initialize(parameters); | 41 int exit_code = main_runner->Initialize(parameters); |
43 if (exit_code >= 0) | 42 if (exit_code >= 0) |
44 return exit_code; | 43 return exit_code; |
45 | 44 |
46 exit_code = main_runner->Run(); | 45 exit_code = main_runner->Run(); |
47 | 46 |
48 main_runner->Shutdown(); | 47 main_runner->Shutdown(); |
49 | 48 |
50 return exit_code; | 49 return exit_code; |
51 } | 50 } |
52 | 51 |
53 } // namespace content | 52 } // namespace content |
OLD | NEW |