summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/browser_main.cc
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
commit679147eead574d186ebf3069647b4c23e8ccace6 (patch)
treefc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/content/browser/browser_main.cc
Initial import.
Diffstat (limited to 'chromium/content/browser/browser_main.cc')
-rw-r--r--chromium/content/browser/browser_main.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/chromium/content/browser/browser_main.cc b/chromium/content/browser/browser_main.cc
new file mode 100644
index 00000000000..640ccee5ac7
--- /dev/null
+++ b/chromium/content/browser/browser_main.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/browser_main.h"
+
+#include "base/debug/trace_event.h"
+#include "content/common/content_constants_internal.h"
+#include "content/public/browser/browser_main_runner.h"
+
+namespace content {
+
+// Main routine for running as the Browser process.
+int BrowserMain(const MainFunctionParams& parameters) {
+ TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, "");
+ base::debug::TraceLog::GetInstance()->SetProcessName("Browser");
+ base::debug::TraceLog::GetInstance()->SetProcessSortIndex(
+ kTraceEventBrowserProcessSortIndex);
+
+ scoped_ptr<BrowserMainRunner> main_runner(BrowserMainRunner::Create());
+
+ int exit_code = main_runner->Initialize(parameters);
+ if (exit_code >= 0)
+ return exit_code;
+
+ exit_code = main_runner->Run();
+
+ main_runner->Shutdown();
+
+ TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
+
+ return exit_code;
+}
+
+} // namespace content