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 "chrome/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1888 browser_init_.reset(); | 1888 browser_init_.reset(); |
1889 | 1889 |
1890 PostBrowserStart(); | 1890 PostBrowserStart(); |
1891 | 1891 |
1892 return result_code_; | 1892 return result_code_; |
1893 } | 1893 } |
1894 | 1894 |
1895 bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) { | 1895 bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) { |
1896 // Set the result code set in PreMainMessageLoopRun or set above. | 1896 // Set the result code set in PreMainMessageLoopRun or set above. |
1897 *result_code = result_code_; | 1897 *result_code = result_code_; |
1898 | 1898 #if defined(USE_ASH) |
sky
2012/05/01 15:43:27
If you need to move Show here, can it now be moved
oshima
2012/05/01 16:25:33
Done.
| |
1899 ash::Shell::GetRootWindow()->ShowRootWindow(); | |
1900 #endif | |
1899 if (!run_message_loop_) | 1901 if (!run_message_loop_) |
1900 return true; // Don't run the default message loop. | 1902 return true; // Don't run the default message loop. |
1901 | 1903 |
1902 // This should be invoked as close to the start of the browser's | 1904 // This should be invoked as close to the start of the browser's |
1903 // UI thread message loop as possible to get a stable measurement | 1905 // UI thread message loop as possible to get a stable measurement |
1904 // across versions. | 1906 // across versions. |
1905 RecordBrowserStartupTime(); | 1907 RecordBrowserStartupTime(); |
1906 | |
1907 #if defined(USE_AURA) | 1908 #if defined(USE_AURA) |
1908 #if defined(USE_ASH) | |
1909 ash::Shell::GetRootWindow()->ShowRootWindow(); | |
1910 #endif | |
1911 MessageLoopForUI::current()->Run(); | 1909 MessageLoopForUI::current()->Run(); |
1912 #elif defined(TOOLKIT_VIEWS) | 1910 #elif defined(TOOLKIT_VIEWS) |
1913 views::AcceleratorHandler accelerator_handler; | 1911 views::AcceleratorHandler accelerator_handler; |
1914 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); | 1912 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
1915 #elif defined(USE_X11) | 1913 #elif defined(USE_X11) |
1916 MessageLoopForUI::current()->RunWithDispatcher(NULL); | 1914 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
1917 #elif defined(OS_POSIX) | 1915 #elif defined(OS_POSIX) |
1918 MessageLoopForUI::current()->Run(); | 1916 MessageLoopForUI::current()->Run(); |
1919 #endif | 1917 #endif |
1920 | 1918 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2019 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2017 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2020 uma_name += "_XP"; | 2018 uma_name += "_XP"; |
2021 | 2019 |
2022 uma_name += "_PreRead_"; | 2020 uma_name += "_PreRead_"; |
2023 uma_name += pre_read_percentage; | 2021 uma_name += pre_read_percentage; |
2024 AddPreReadHistogramTime(uma_name.c_str(), time); | 2022 AddPreReadHistogramTime(uma_name.c_str(), time); |
2025 } | 2023 } |
2026 #endif | 2024 #endif |
2027 #endif | 2025 #endif |
2028 } | 2026 } |
OLD | NEW |