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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 if (!run_message_loop_) | 1575 if (!run_message_loop_) |
1576 return true; // Don't run the default message loop. | 1576 return true; // Don't run the default message loop. |
1577 | 1577 |
1578 // These should be invoked as close to the start of the browser's | 1578 // These should be invoked as close to the start of the browser's |
1579 // UI thread message loop as possible to get a stable measurement | 1579 // UI thread message loop as possible to get a stable measurement |
1580 // across versions. | 1580 // across versions. |
1581 RecordBrowserStartupTime(); | 1581 RecordBrowserStartupTime(); |
1582 startup_timer_->SignalStartupComplete( | 1582 startup_timer_->SignalStartupComplete( |
1583 performance_monitor::StartupTimer::STARTUP_NORMAL); | 1583 performance_monitor::StartupTimer::STARTUP_NORMAL); |
1584 | 1584 |
1585 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 1585 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); |
1586 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) | 1586 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
1587 views::AcceleratorHandler accelerator_handler; | 1587 views::AcceleratorHandler accelerator_handler; |
1588 base::RunLoop run_loop(&accelerator_handler); | 1588 base::RunLoop run_loop(&accelerator_handler); |
1589 #else | 1589 #else |
1590 base::RunLoop run_loop; | 1590 base::RunLoop run_loop; |
1591 #endif | 1591 #endif |
1592 | 1592 |
1593 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1593 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1594 switches::kPerformanceMonitorGathering)) { | 1594 switches::kPerformanceMonitorGathering)) { |
1595 performance_monitor::PerformanceMonitor::GetInstance()->Start(); | 1595 performance_monitor::PerformanceMonitor::GetInstance()->Start(); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1747 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1748 uma_name += "_XP"; | 1748 uma_name += "_XP"; |
1749 | 1749 |
1750 uma_name += "_PreRead_"; | 1750 uma_name += "_PreRead_"; |
1751 uma_name += pre_read_percentage; | 1751 uma_name += pre_read_percentage; |
1752 AddPreReadHistogramTime(uma_name.c_str(), time); | 1752 AddPreReadHistogramTime(uma_name.c_str(), time); |
1753 } | 1753 } |
1754 #endif | 1754 #endif |
1755 #endif | 1755 #endif |
1756 } | 1756 } |
OLD | NEW |