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

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: Add minor comment 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
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..2247a9b6c5fcbc5374f2adb97475c8b77436fb89 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,11 @@ 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, const TimeMarker& marker);
+ static void AddMarkerImpl(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') | chrome/browser/chromeos/boot_times_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698