| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Check the previous Chrome version from the Database and determine if | 93 // Check the previous Chrome version from the Database and determine if |
| 94 // it has been updated. If it has, insert an event in the database. | 94 // it has been updated. If it has, insert an event in the database. |
| 95 void CheckForVersionUpdateOnBackgroundThread(); | 95 void CheckForVersionUpdateOnBackgroundThread(); |
| 96 | 96 |
| 97 // Wrapper function for inserting events into the database. | 97 // Wrapper function for inserting events into the database. |
| 98 void AddEvent(scoped_ptr<Event> event); | 98 void AddEvent(scoped_ptr<Event> event); |
| 99 | 99 |
| 100 void AddEventOnBackgroundThread(scoped_ptr<Event> event); | 100 void AddEventOnBackgroundThread(scoped_ptr<Event> event); |
| 101 | 101 |
| 102 // Since Database::AddMetric() is overloaded, base::Bind() does not work and |
| 103 // we need a helper function. |
| 104 void AddMetricOnBackgroundThread(MetricType type, const std::string& value); |
| 105 |
| 102 // Notify any listeners that PerformanceMonitor has finished the initializing. | 106 // Notify any listeners that PerformanceMonitor has finished the initializing. |
| 103 void NotifyInitialized(); | 107 void NotifyInitialized(); |
| 104 | 108 |
| 105 // Perform any collections that are done on a timed basis. | 109 // Perform any collections that are done on a timed basis. |
| 106 void DoTimedCollections(); | 110 void DoTimedCollections(); |
| 107 | 111 |
| 108 // Update the database record of the last time the active profiles were | 112 // Update the database record of the last time the active profiles were |
| 109 // running; this is used in determining when an unclean exit occurred. | 113 // running; this is used in determining when an unclean exit occurred. |
| 110 void UpdateLiveProfiles(); | 114 void UpdateLiveProfiles(); |
| 111 void UpdateLiveProfilesHelper( | 115 void UpdateLiveProfilesHelper( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 base::RepeatingTimer<PerformanceMonitor> timer_; | 151 base::RepeatingTimer<PerformanceMonitor> timer_; |
| 148 | 152 |
| 149 content::NotificationRegistrar registrar_; | 153 content::NotificationRegistrar registrar_; |
| 150 | 154 |
| 151 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); | 155 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); |
| 152 }; | 156 }; |
| 153 | 157 |
| 154 } // namespace performance_monitor | 158 } // namespace performance_monitor |
| 155 | 159 |
| 156 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ | 160 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ |
| OLD | NEW |