summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-22 04:52:56 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-22 04:52:56 +0000
commitddf124cb8f239ecfbe2339d16f4e3dc849798d20 (patch)
treeefd60310a937d87d9dfd48816779dad690111d83 /chrome/browser/browser_main.cc
parent0f7a0191f603800bbf7e387277ed29a6209063bc (diff)
downloadchromium_src-ddf124cb8f239ecfbe2339d16f4e3dc849798d20.zip
chromium_src-ddf124cb8f239ecfbe2339d16f4e3dc849798d20.tar.gz
chromium_src-ddf124cb8f239ecfbe2339d16f4e3dc849798d20.tar.bz2
Getting perf numbers. Will revert.
BUG=none TEST=none TBR=viettrungluu@chromium.org Review URL: http://codereview.chromium.org/502099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index ff1d17d..f8cbfd1 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -451,7 +451,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
views::ViewsDelegate::views_delegate = new ChromeViewsDelegate;
#endif
-
if (is_first_run) {
#if defined(OS_WIN)
// During first run we read the google_update registry key to find what
@@ -901,8 +900,20 @@ int BrowserMain(const MainFunctionParams& parameters) {
MessageLoopForUI::current()->PostTask(FROM_HERE, parameters.ui_task);
RunUIMessageLoop(browser_process.get());
} else {
- // We are in regular browser boot sequence. Open initial stabs and enter
- // the main message loop.
+ // We are in regular browser boot sequence.
+#if defined(OS_MACOSX)
+ // On Mac, the message which provides the browser with the startup URLs and
+ // the Apple Event which generates |-applicationDidFinishLaunching:| are
+ // queued up.
+ // TODO(viettrungluu): This is what seems to happen *AFAICT*. This is a bit
+ // fragile. The DCHECK() below will fail if |-aDFL:| is not reached, but
+ // there is currently no way to tell if subsequent messages are processed.
+ // This is evidently fragile, and should be made more robust.
+ MessageLoopForUI::current()->RunAllPending();
+ DCHECK(Platform::IsStartupComplete());
+#endif
+
+ // Open initial tabs and enter the main message loop.
if (browser_init.Start(parsed_command_line, std::wstring(), profile,
&result_code)) {
// Call Recycle() here as late as possible, before going into the loop