| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 #if defined(TOOLKIT_GTK) | 172 #if defined(TOOLKIT_GTK) |
| 173 #include "chrome/browser/ui/gtk/gtk_util.h" | 173 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 174 #include "ui/gfx/gtk_util.h" | 174 #include "ui/gfx/gtk_util.h" |
| 175 #endif | 175 #endif |
| 176 | 176 |
| 177 #if defined(USE_X11) | 177 #if defined(USE_X11) |
| 178 #include "chrome/browser/chrome_browser_main_x11.h" | 178 #include "chrome/browser/chrome_browser_main_x11.h" |
| 179 #endif | 179 #endif |
| 180 | 180 |
| 181 #if defined(USE_AURA) | 181 #if defined(USE_AURA) |
| 182 #include "ui/aura/root_window.h" |
| 183 #endif |
| 184 |
| 185 #if defined(USE_ASH) |
| 182 #include "ash/shell.h" | 186 #include "ash/shell.h" |
| 183 #include "ui/aura/root_window.h" | |
| 184 #endif | 187 #endif |
| 185 | 188 |
| 186 using content::BrowserThread; | 189 using content::BrowserThread; |
| 187 | 190 |
| 188 namespace { | 191 namespace { |
| 189 | 192 |
| 190 // This function provides some ways to test crash and assertion handling | 193 // This function provides some ways to test crash and assertion handling |
| 191 // behavior of the program. | 194 // behavior of the program. |
| 192 void HandleTestParameters(const CommandLine& command_line) { | 195 void HandleTestParameters(const CommandLine& command_line) { |
| 193 // This parameter causes an assertion. | 196 // This parameter causes an assertion. |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 | 1778 |
| 1776 if (!run_message_loop_) | 1779 if (!run_message_loop_) |
| 1777 return true; // Don't run the default message loop. | 1780 return true; // Don't run the default message loop. |
| 1778 | 1781 |
| 1779 // This should be invoked as close to the start of the browser's | 1782 // This should be invoked as close to the start of the browser's |
| 1780 // UI thread message loop as possible to get a stable measurement | 1783 // UI thread message loop as possible to get a stable measurement |
| 1781 // across versions. | 1784 // across versions. |
| 1782 RecordBrowserStartupTime(); | 1785 RecordBrowserStartupTime(); |
| 1783 | 1786 |
| 1784 #if defined(USE_AURA) | 1787 #if defined(USE_AURA) |
| 1788 #if defined(USE_ASH) |
| 1785 ash::Shell::GetRootWindow()->ShowRootWindow(); | 1789 ash::Shell::GetRootWindow()->ShowRootWindow(); |
| 1790 #endif |
| 1786 MessageLoopForUI::current()->Run(); | 1791 MessageLoopForUI::current()->Run(); |
| 1787 #elif defined(TOOLKIT_VIEWS) | 1792 #elif defined(TOOLKIT_VIEWS) |
| 1788 views::AcceleratorHandler accelerator_handler; | 1793 views::AcceleratorHandler accelerator_handler; |
| 1789 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); | 1794 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
| 1790 #elif defined(USE_X11) | 1795 #elif defined(USE_X11) |
| 1791 MessageLoopForUI::current()->RunWithDispatcher(NULL); | 1796 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
| 1792 #elif defined(OS_POSIX) | 1797 #elif defined(OS_POSIX) |
| 1793 MessageLoopForUI::current()->Run(); | 1798 MessageLoopForUI::current()->Run(); |
| 1794 #endif | 1799 #endif |
| 1795 | 1800 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1899 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1895 uma_name += "_XP"; | 1900 uma_name += "_XP"; |
| 1896 | 1901 |
| 1897 uma_name += "_PreRead_"; | 1902 uma_name += "_PreRead_"; |
| 1898 uma_name += pre_read_percentage; | 1903 uma_name += pre_read_percentage; |
| 1899 AddPreReadHistogramTime(uma_name.c_str(), time); | 1904 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1900 } | 1905 } |
| 1901 #endif | 1906 #endif |
| 1902 #endif | 1907 #endif |
| 1903 } | 1908 } |
| OLD | NEW |