summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/histogram.cc2
-rw-r--r--base/histogram.h4
-rw-r--r--base/stats_table.cc6
-rw-r--r--base/time_win_unittest.cc2
-rw-r--r--base/tracked_objects.cc2
5 files changed, 8 insertions, 8 deletions
diff --git a/base/histogram.cc b/base/histogram.cc
index bdf7f9a..9184926e 100644
--- a/base/histogram.cc
+++ b/base/histogram.cc
@@ -640,7 +640,7 @@ void ThreadSafeHistogram::Accumulate(Sample value, Count count, size_t index) {
Histogram::Accumulate(value, count, index);
}
-void ThreadSafeHistogram::SnapshotSample(SampleSet* sample) {
+void ThreadSafeHistogram::SnapshotSample(SampleSet* sample) const {
AutoLock lock(lock_);
Histogram::SnapshotSample(sample);
};
diff --git a/base/histogram.h b/base/histogram.h
index 7ec556f..7c4b3b8 100644
--- a/base/histogram.h
+++ b/base/histogram.h
@@ -475,10 +475,10 @@ class ThreadSafeHistogram : public Histogram {
// Provide locked versions to get precise counts.
virtual void Accumulate(Sample value, Count count, size_t index);
- virtual void SnapshotSample(SampleSet* sample);
+ virtual void SnapshotSample(SampleSet* sample) const;
private:
- Lock lock_;
+ mutable Lock lock_;
DISALLOW_COPY_AND_ASSIGN(ThreadSafeHistogram);
};
diff --git a/base/stats_table.cc b/base/stats_table.cc
index d2b6a9e..31f85d5 100644
--- a/base/stats_table.cc
+++ b/base/stats_table.cc
@@ -502,9 +502,9 @@ int StatsTable::GetRowValue(int index, int pid) const {
int rv = 0;
int* row = impl_->row(index);
- for (int index = 0; index < impl_->max_threads(); index++) {
- if (pid == 0 || *impl_->thread_pid(index) == pid)
- rv += row[index];
+ for (int slot_id = 0; slot_id < impl_->max_threads(); slot_id++) {
+ if (pid == 0 || *impl_->thread_pid(slot_id) == pid)
+ rv += row[slot_id];
}
return rv;
}
diff --git a/base/time_win_unittest.cc b/base/time_win_unittest.cc
index 1e76a39..9dd8a23 100644
--- a/base/time_win_unittest.cc
+++ b/base/time_win_unittest.cc
@@ -126,7 +126,7 @@ TEST(TimeTicks, SubMillisecondTimers) {
last_time = now;
}
EXPECT_TRUE(saw_submillisecond_timer);
- printf("Min timer is: %dus\n", min_timer);
+ printf("Min timer is: %ldus\n", static_cast<long>(min_timer));
}
TEST(TimeTicks, TimeGetTimeCaps) {
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index 3d907b2..f95f9b8 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -81,7 +81,7 @@ Lock ThreadData::list_lock_;
// static
ThreadData::Status ThreadData::status_ = ThreadData::UNINITIALIZED;
-ThreadData::ThreadData() : message_loop_(MessageLoop::current()) {}
+ThreadData::ThreadData() : next_(NULL), message_loop_(MessageLoop::current()) {}
// static
ThreadData* ThreadData::current() {