OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 #if defined(TOUCH_UI) | 197 #if defined(TOUCH_UI) |
198 #include "ui/base/touch/touch_factory.h" | 198 #include "ui/base/touch/touch_factory.h" |
199 #endif | 199 #endif |
200 | 200 |
201 #if defined(USE_X11) | 201 #if defined(USE_X11) |
202 #include "chrome/browser/chrome_browser_main_x11.h" | 202 #include "chrome/browser/chrome_browser_main_x11.h" |
203 #endif | 203 #endif |
204 | 204 |
205 #if defined(USE_AURA) | 205 #if defined(USE_AURA) |
206 #include "ui/aura/desktop.h" | 206 #include "ui/aura/root_window.h" |
207 #endif | 207 #endif |
208 | 208 |
209 using content::BrowserThread; | 209 using content::BrowserThread; |
210 | 210 |
211 namespace net { | 211 namespace net { |
212 class NetLog; | 212 class NetLog; |
213 } // namespace net | 213 } // namespace net |
214 | 214 |
215 namespace { | 215 namespace { |
216 | 216 |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 | 1990 |
1991 if (!run_message_loop_) | 1991 if (!run_message_loop_) |
1992 return true; // Don't run the default message loop. | 1992 return true; // Don't run the default message loop. |
1993 | 1993 |
1994 // This should be invoked as close to the start of the browser's | 1994 // This should be invoked as close to the start of the browser's |
1995 // UI thread message loop as possible to get a stable measurement | 1995 // UI thread message loop as possible to get a stable measurement |
1996 // across versions. | 1996 // across versions. |
1997 RecordBrowserStartupTime(); | 1997 RecordBrowserStartupTime(); |
1998 | 1998 |
1999 #if defined(USE_AURA) | 1999 #if defined(USE_AURA) |
2000 aura::Desktop::GetInstance()->Run(); | 2000 aura::RootWindow::GetInstance()->Run(); |
2001 #elif defined(TOOLKIT_VIEWS) | 2001 #elif defined(TOOLKIT_VIEWS) |
2002 views::AcceleratorHandler accelerator_handler; | 2002 views::AcceleratorHandler accelerator_handler; |
2003 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); | 2003 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
2004 #elif defined(USE_X11) | 2004 #elif defined(USE_X11) |
2005 MessageLoopForUI::current()->RunWithDispatcher(NULL); | 2005 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
2006 #elif defined(OS_POSIX) | 2006 #elif defined(OS_POSIX) |
2007 MessageLoopForUI::current()->Run(); | 2007 MessageLoopForUI::current()->Run(); |
2008 #endif | 2008 #endif |
2009 #if defined(OS_CHROMEOS) | 2009 #if defined(OS_CHROMEOS) |
2010 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", | 2010 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2155 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2156 (pre_read == "0" || pre_read == "1")) { | 2156 (pre_read == "0" || pre_read == "1")) { |
2157 std::string uma_name(name); | 2157 std::string uma_name(name); |
2158 uma_name += "_PreRead"; | 2158 uma_name += "_PreRead"; |
2159 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2159 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2160 AddPreReadHistogramTime(uma_name.c_str(), time); | 2160 AddPreReadHistogramTime(uma_name.c_str(), time); |
2161 } | 2161 } |
2162 #endif | 2162 #endif |
2163 #endif | 2163 #endif |
2164 } | 2164 } |
OLD | NEW |