| 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 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ | 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ |
| 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ | 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // already present. | 166 // already present. |
| 167 void MarkProcessAsAlive(const base::ProcessHandle& handle, | 167 void MarkProcessAsAlive(const base::ProcessHandle& handle, |
| 168 int process_type, | 168 int process_type, |
| 169 int current_update_sequence); | 169 int current_update_sequence); |
| 170 | 170 |
| 171 // Updates the ProcessMetrics map with the current list of processes and | 171 // Updates the ProcessMetrics map with the current list of processes and |
| 172 // gathers metrics from each entry. | 172 // gathers metrics from each entry. |
| 173 void GatherMetricsMapOnUIThread(); | 173 void GatherMetricsMapOnUIThread(); |
| 174 void GatherMetricsMapOnIOThread(int current_update_sequence); | 174 void GatherMetricsMapOnIOThread(int current_update_sequence); |
| 175 | 175 |
| 176 #if defined(ENABLE_EXTENSIONS) |
| 176 // Generate an appropriate ExtensionEvent for an extension-related occurrance | 177 // Generate an appropriate ExtensionEvent for an extension-related occurrance |
| 177 // and insert it in the database. | 178 // and insert it in the database. |
| 178 void AddExtensionEvent(EventType type, | 179 void AddExtensionEvent(EventType type, |
| 179 const extensions::Extension* extension); | 180 const extensions::Extension* extension); |
| 181 #endif |
| 180 | 182 |
| 181 // Generate an appropriate RendererFailure for a renderer crash and insert it | 183 // Generate an appropriate RendererFailure for a renderer crash and insert it |
| 182 // in the database. | 184 // in the database. |
| 183 void AddRendererClosedEvent( | 185 void AddRendererClosedEvent( |
| 184 content::RenderProcessHost* host, | 186 content::RenderProcessHost* host, |
| 185 const content::RenderProcessHost::RendererClosedDetails& details); | 187 const content::RenderProcessHost::RendererClosedDetails& details); |
| 186 | 188 |
| 187 // The store for all performance data that must be gathered from the IO | 189 // The store for all performance data that must be gathered from the IO |
| 188 // thread. | 190 // thread. |
| 189 PerformanceDataForIOThread performance_data_for_io_thread_; | 191 PerformanceDataForIOThread performance_data_for_io_thread_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 220 | 222 |
| 221 // Disable auto-starting the collection timer; used for tests. | 223 // Disable auto-starting the collection timer; used for tests. |
| 222 bool disable_timer_autostart_for_testing_; | 224 bool disable_timer_autostart_for_testing_; |
| 223 | 225 |
| 224 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); | 226 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); |
| 225 }; | 227 }; |
| 226 | 228 |
| 227 } // namespace performance_monitor | 229 } // namespace performance_monitor |
| 228 | 230 |
| 229 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ | 231 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ |
| OLD | NEW |