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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void GatherMemoryUsageOnBackgroundThread(); | 158 void GatherMemoryUsageOnBackgroundThread(); |
159 | 159 |
160 // Updates the ProcessMetrics map with the current list of processes. | 160 // Updates the ProcessMetrics map with the current list of processes. |
161 void UpdateMetricsMapOnBackgroundThread(); | 161 void UpdateMetricsMapOnBackgroundThread(); |
162 | 162 |
163 // Generate an appropriate ExtensionEvent for an extension-related occurrance | 163 // Generate an appropriate ExtensionEvent for an extension-related occurrance |
164 // and insert it in the database. | 164 // and insert it in the database. |
165 void AddExtensionEvent(EventType type, | 165 void AddExtensionEvent(EventType type, |
166 const extensions::Extension* extension); | 166 const extensions::Extension* extension); |
167 | 167 |
168 // Generate an appropriate CrashEvent for a renderer crash and insert it in | 168 // Generate an appropriate RendererFailure for a renderer crash and insert it |
169 // the database. | 169 // in the database. |
170 void AddCrashEvent( | 170 void AddRendererClosedEvent( |
| 171 content::RenderProcessHost* host, |
171 const content::RenderProcessHost::RendererClosedDetails& details); | 172 const content::RenderProcessHost::RendererClosedDetails& details); |
172 | 173 |
173 // Called on the IO thread, this will call InsertIOData on the background | 174 // Called on the IO thread, this will call InsertIOData on the background |
174 // thread with a copy of the PerformanceDataForIOThread object to prevent | 175 // thread with a copy of the PerformanceDataForIOThread object to prevent |
175 // any possible race conditions. | 176 // any possible race conditions. |
176 void CallInsertIOData(); | 177 void CallInsertIOData(); |
177 | 178 |
178 // Insert the collected IO data into the database (deliberately not const & so | 179 // Insert the collected IO data into the database (deliberately not const & so |
179 // we create a copy and it becomes thread-safe). | 180 // we create a copy and it becomes thread-safe). |
180 void InsertIOData(PerformanceDataForIOThread performance_data_for_io_thread); | 181 void InsertIOData(PerformanceDataForIOThread performance_data_for_io_thread); |
(...skipping 21 matching lines...) Expand all Loading... |
202 // the PERFORMANCE_MONITOR_INITIALIZED notification or should check this | 203 // the PERFORMANCE_MONITOR_INITIALIZED notification or should check this |
203 // flag. | 204 // flag. |
204 static bool initialized_; | 205 static bool initialized_; |
205 | 206 |
206 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); | 207 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); |
207 }; | 208 }; |
208 | 209 |
209 } // namespace performance_monitor | 210 } // namespace performance_monitor |
210 | 211 |
211 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ | 212 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ |
OLD | NEW |