Add ICU message format support
[chromium-blink-merge.git] / content / browser / browser_main.cc
blob4c114b436133f6823324dc4be39bfe72e79de093
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
3 // found in the LICENSE file.
5 #include "content/browser/browser_main.h"
7 #include "base/trace_event/trace_event.h"
8 #include "content/common/content_constants_internal.h"
9 #include "content/public/browser/browser_main_runner.h"
11 namespace content {
13 // Main routine for running as the Browser process.
14 int BrowserMain(const MainFunctionParams& parameters) {
15 TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, "");
16 base::trace_event::TraceLog::GetInstance()->SetProcessName("Browser");
17 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
18 kTraceEventBrowserProcessSortIndex);
20 scoped_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create());
22 int exit_code = main_runner->Initialize(parameters);
23 if (exit_code >= 0)
24 return exit_code;
26 exit_code = main_runner->Run();
28 main_runner->Shutdown();
30 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
32 return exit_code;
35 } // namespace content