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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 if (!run_message_loop_) | 1568 if (!run_message_loop_) |
1569 return true; // Don't run the default message loop. | 1569 return true; // Don't run the default message loop. |
1570 | 1570 |
1571 // These should be invoked as close to the start of the browser's | 1571 // These should be invoked as close to the start of the browser's |
1572 // UI thread message loop as possible to get a stable measurement | 1572 // UI thread message loop as possible to get a stable measurement |
1573 // across versions. | 1573 // across versions. |
1574 RecordBrowserStartupTime(); | 1574 RecordBrowserStartupTime(); |
1575 startup_timer_->SignalStartupComplete( | 1575 startup_timer_->SignalStartupComplete( |
1576 performance_monitor::StartupTimer::STARTUP_NORMAL); | 1576 performance_monitor::StartupTimer::STARTUP_NORMAL); |
1577 | 1577 |
1578 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); | 1578 DCHECK(base::MessageLoopForUI::IsCurrent()); |
1579 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) | 1579 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
1580 views::AcceleratorHandler accelerator_handler; | 1580 views::AcceleratorHandler accelerator_handler; |
1581 base::RunLoop run_loop(&accelerator_handler); | 1581 base::RunLoop run_loop(&accelerator_handler); |
1582 #else | 1582 #else |
1583 base::RunLoop run_loop; | 1583 base::RunLoop run_loop; |
1584 #endif | 1584 #endif |
1585 | 1585 |
1586 performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle(); | 1586 performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle(); |
1587 | 1587 |
1588 MetricsService::SetExecutionPhase(MetricsService::MAIN_MESSAGE_LOOP_RUN); | 1588 MetricsService::SetExecutionPhase(MetricsService::MAIN_MESSAGE_LOOP_RUN); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 chromeos::CrosSettings::Shutdown(); | 1655 chromeos::CrosSettings::Shutdown(); |
1656 #endif | 1656 #endif |
1657 #endif | 1657 #endif |
1658 } | 1658 } |
1659 | 1659 |
1660 // Public members: | 1660 // Public members: |
1661 | 1661 |
1662 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1662 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1663 chrome_extra_parts_.push_back(parts); | 1663 chrome_extra_parts_.push_back(parts); |
1664 } | 1664 } |
OLD | NEW |