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

Unified Diff: chrome/browser/chromeos/boot_times_loader.h

Issue 9453026: Make BootTimesLoader marker usage thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/boot_times_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/boot_times_loader.h
diff --git a/chrome/browser/chromeos/boot_times_loader.h b/chrome/browser/chromeos/boot_times_loader.h
index 0cae34f1d35762f1ede1ebfdad8229e37f208493..accc8b527721d3fde3f577cb755e0faf1c22c67f 100644
--- a/chrome/browser/chromeos/boot_times_loader.h
+++ b/chrome/browser/chromeos/boot_times_loader.h
@@ -140,6 +140,11 @@ class BootTimesLoader
base::Time time() const { return time_; }
bool send_to_uma() const { return send_to_uma_; }
+ // comparitor for sorting
+ bool operator<(const TimeMarker& other) const {
+ return time_ < other.time_;
+ }
+
private:
friend class std::vector<TimeMarker>;
std::string name_;
@@ -159,7 +164,9 @@ class BootTimesLoader
static void WriteTimes(const std::string base_name,
const std::string uma_name,
const std::string uma_prefix,
- const std::vector<TimeMarker> login_times);
+ std::vector<TimeMarker> login_times);
+ static void AddMarker(std::vector<TimeMarker>* vector, TimeMarker marker);
+
void LoginDone();
// Used to hold the stats at main().
« no previous file with comments | « no previous file | chrome/browser/chromeos/boot_times_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698