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