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

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: Rebase Created 7 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/performance_monitor/constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 performance_monitor::StartupTimer::STARTUP_NORMAL); 1568 performance_monitor::StartupTimer::STARTUP_NORMAL);
1569 1569
1570 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 1570 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
1571 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) 1571 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
1572 views::AcceleratorHandler accelerator_handler; 1572 views::AcceleratorHandler accelerator_handler;
1573 base::RunLoop run_loop(&accelerator_handler); 1573 base::RunLoop run_loop(&accelerator_handler);
1574 #else 1574 #else
1575 base::RunLoop run_loop; 1575 base::RunLoop run_loop;
1576 #endif 1576 #endif
1577 1577
1578 if (CommandLine::ForCurrentProcess()->HasSwitch( 1578 performance_monitor::PerformanceMonitor::GetInstance()->Start();
1579 switches::kPerformanceMonitorGathering)) {
1580 performance_monitor::PerformanceMonitor::GetInstance()->Start();
1581 }
1582 1579
1583 run_loop.Run(); 1580 run_loop.Run();
1584 1581
1585 return true; 1582 return true;
1586 #endif 1583 #endif
1587 } 1584 }
1588 1585
1589 void ChromeBrowserMainParts::PostMainMessageLoopRun() { 1586 void ChromeBrowserMainParts::PostMainMessageLoopRun() {
1590 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun"); 1587 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopRun");
1591 #if defined(OS_ANDROID) 1588 #if defined(OS_ANDROID)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 chromeos::CrosSettings::Shutdown(); 1645 chromeos::CrosSettings::Shutdown();
1649 #endif 1646 #endif
1650 #endif 1647 #endif
1651 } 1648 }
1652 1649
1653 // Public members: 1650 // Public members:
1654 1651
1655 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1652 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1656 chrome_extra_parts_.push_back(parts); 1653 chrome_extra_parts_.push_back(parts);
1657 } 1654 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/performance_monitor/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698