Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 23825004: PerformanceMonitor: UMA alert for high browser CPU usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed dependencies. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 performance_monitor::StartupTimer::STARTUP_NORMAL); 1609 performance_monitor::StartupTimer::STARTUP_NORMAL);
1610 1610
1611 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 1611 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
1612 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) 1612 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
1613 views::AcceleratorHandler accelerator_handler; 1613 views::AcceleratorHandler accelerator_handler;
1614 base::RunLoop run_loop(&accelerator_handler); 1614 base::RunLoop run_loop(&accelerator_handler);
1615 #else 1615 #else
1616 base::RunLoop run_loop; 1616 base::RunLoop run_loop;
1617 #endif 1617 #endif
1618 1618
1619 if (CommandLine::ForCurrentProcess()->HasSwitch( 1619 performance_monitor::PerformanceMonitor::GetInstance()->Start();
1620 switches::kPerformanceMonitorGathering)) {
1621 performance_monitor::PerformanceMonitor::GetInstance()->Start();
1622 }
1623 1620
1624 run_loop.Run(); 1621 run_loop.Run();
1625 1622
1626 return true; 1623 return true;
1627 #endif 1624 #endif
1628 } 1625 }
1629 1626
1630 void ChromeBrowserMainParts::PostMainMessageLoopRun() { 1627 void ChromeBrowserMainParts::PostMainMessageLoopRun() {
1631 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun"); 1628 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun");
1632 #if defined(OS_ANDROID) 1629 #if defined(OS_ANDROID)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 chromeos::CrosSettings::Shutdown(); 1686 chromeos::CrosSettings::Shutdown();
1690 #endif 1687 #endif
1691 #endif 1688 #endif
1692 } 1689 }
1693 1690
1694 // Public members: 1691 // Public members:
1695 1692
1696 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1693 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1697 chrome_extra_parts_.push_back(parts); 1694 chrome_extra_parts_.push_back(parts);
1698 } 1695 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/performance_monitor/constants.h » ('j') | chrome/browser/performance_monitor/event_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698