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 "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 { |
| 11 |
10 // Main routine for running as the Browser process. | 12 // Main routine for running as the Browser process. |
11 int BrowserMain(const content::MainFunctionParams& parameters) { | 13 int BrowserMain(const MainFunctionParams& parameters) { |
12 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, ""); | 14 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, ""); |
13 | 15 |
14 scoped_ptr<content::BrowserMainRunner> main_runner_( | 16 scoped_ptr<BrowserMainRunner> main_runner_(BrowserMainRunner::Create()); |
15 content::BrowserMainRunner::Create()); | |
16 | 17 |
17 int exit_code = main_runner_->Initialize(parameters); | 18 int exit_code = main_runner_->Initialize(parameters); |
18 if (exit_code >= 0) | 19 if (exit_code >= 0) |
19 return exit_code; | 20 return exit_code; |
20 | 21 |
21 exit_code = main_runner_->Run(); | 22 exit_code = main_runner_->Run(); |
22 | 23 |
23 main_runner_->Shutdown(); | 24 main_runner_->Shutdown(); |
24 | 25 |
25 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 26 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
26 | 27 |
27 return exit_code; | 28 return exit_code; |
28 } | 29 } |
| 30 |
| 31 } // namespace content |
OLD | NEW |