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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 if (!run_message_loop_) | 1618 if (!run_message_loop_) |
1619 return true; // Don't run the default message loop. | 1619 return true; // Don't run the default message loop. |
1620 | 1620 |
1621 // These should be invoked as close to the start of the browser's | 1621 // These should be invoked as close to the start of the browser's |
1622 // UI thread message loop as possible to get a stable measurement | 1622 // UI thread message loop as possible to get a stable measurement |
1623 // across versions. | 1623 // across versions. |
1624 RecordBrowserStartupTime(do_first_run_tasks_); | 1624 RecordBrowserStartupTime(do_first_run_tasks_); |
1625 startup_timer_->SignalStartupComplete( | 1625 startup_timer_->SignalStartupComplete( |
1626 performance_monitor::StartupTimer::STARTUP_NORMAL); | 1626 performance_monitor::StartupTimer::STARTUP_NORMAL); |
1627 | 1627 |
1628 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 1628 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); |
1629 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) | 1629 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
1630 views::AcceleratorHandler accelerator_handler; | 1630 views::AcceleratorHandler accelerator_handler; |
1631 base::RunLoop run_loop(&accelerator_handler); | 1631 base::RunLoop run_loop(&accelerator_handler); |
1632 #else | 1632 #else |
1633 base::RunLoop run_loop; | 1633 base::RunLoop run_loop; |
1634 #endif | 1634 #endif |
1635 | 1635 |
1636 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1636 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1637 switches::kPerformanceMonitorGathering)) { | 1637 switches::kPerformanceMonitorGathering)) { |
1638 performance_monitor::PerformanceMonitor::GetInstance()->Start(); | 1638 performance_monitor::PerformanceMonitor::GetInstance()->Start(); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1792 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1792 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1793 uma_name += "_XP"; | 1793 uma_name += "_XP"; |
1794 | 1794 |
1795 uma_name += "_PreRead_"; | 1795 uma_name += "_PreRead_"; |
1796 uma_name += pre_read_percentage; | 1796 uma_name += pre_read_percentage; |
1797 AddPreReadHistogramTime(uma_name.c_str(), time); | 1797 AddPreReadHistogramTime(uma_name.c_str(), time); |
1798 } | 1798 } |
1799 #endif | 1799 #endif |
1800 #endif | 1800 #endif |
1801 } | 1801 } |
OLD | NEW |