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

Side by Side Diff: chrome/browser/performance_monitor/performance_monitor.h

Issue 10915318: Revert 157168 - Add guards to metric values; erase bad events/metrics from db (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
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 #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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Check the previous Chrome version from the Database and determine if 124 // Check the previous Chrome version from the Database and determine if
125 // it has been updated. If it has, insert an event in the database. 125 // it has been updated. If it has, insert an event in the database.
126 void CheckForVersionUpdateOnBackgroundThread(); 126 void CheckForVersionUpdateOnBackgroundThread();
127 127
128 // Wrapper function for inserting events into the database. 128 // Wrapper function for inserting events into the database.
129 void AddEvent(scoped_ptr<Event> event); 129 void AddEvent(scoped_ptr<Event> event);
130 130
131 void AddEventOnBackgroundThread(scoped_ptr<Event> event); 131 void AddEventOnBackgroundThread(scoped_ptr<Event> event);
132 132
133 // Since Database::AddMetric() is overloaded, base::Bind() does not work and 133 // Since Database::AddMetric() is overloaded, base::Bind() does not work and
134 // we need a helper function. Deliberately not const & so that we will 134 // we need a helper function.
135 // construct a new metric on the background thread. 135 void AddMetricOnBackgroundThread(MetricType type, const std::string& value);
136 void AddMetricOnBackgroundThread(Metric metric);
137 136
138 // Notify any listeners that PerformanceMonitor has finished the initializing. 137 // Notify any listeners that PerformanceMonitor has finished the initializing.
139 void NotifyInitialized(); 138 void NotifyInitialized();
140 139
141 // Perform any collections that are done on a timed basis. 140 // Perform any collections that are done on a timed basis.
142 void DoTimedCollections(); 141 void DoTimedCollections();
143 142
144 // Update the database record of the last time the active profiles were 143 // Update the database record of the last time the active profiles were
145 // running; this is used in determining when an unclean exit occurred. 144 // running; this is used in determining when an unclean exit occurred.
146 void UpdateLiveProfiles(); 145 void UpdateLiveProfiles();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // the PERFORMANCE_MONITOR_INITIALIZED notification or should check this 201 // the PERFORMANCE_MONITOR_INITIALIZED notification or should check this
203 // flag. 202 // flag.
204 static bool initialized_; 203 static bool initialized_;
205 204
206 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); 205 DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor);
207 }; 206 };
208 207
209 } // namespace performance_monitor 208 } // namespace performance_monitor
210 209
211 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_ 210 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_PERFORMANCE_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/performance_monitor/metric.cc ('k') | chrome/browser/performance_monitor/performance_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698