Index: base/metrics/sparse_histogram.cc |
diff --git a/base/metrics/sparse_histogram.cc b/base/metrics/sparse_histogram.cc |
index 773eeb6273c5f8feef7eb77b545cf978d882a223..e5cdb43c04fea1514a032ca3e5c311899a979af4 100644 |
--- a/base/metrics/sparse_histogram.cc |
+++ b/base/metrics/sparse_histogram.cc |
@@ -10,16 +10,14 @@ |
#include "base/strings/stringprintf.h" |
#include "base/synchronization/lock.h" |
-using std::map; |
-using std::string; |
- |
namespace base { |
typedef HistogramBase::Count Count; |
typedef HistogramBase::Sample Sample; |
// static |
-HistogramBase* SparseHistogram::FactoryGet(const string& name, int32 flags) { |
+HistogramBase* SparseHistogram::FactoryGet(const std::string& name, |
+ int32 flags) { |
HistogramBase* histogram = StatisticsRecorder::FindHistogram(name); |
if (!histogram) { |
@@ -70,13 +68,13 @@ bool SparseHistogram::AddSamplesFromPickle(PickleIterator* iter) { |
return samples_.AddFromPickle(iter); |
} |
-void SparseHistogram::WriteHTMLGraph(string* output) const { |
+void SparseHistogram::WriteHTMLGraph(std::string* output) const { |
output->append("<PRE>"); |
WriteAsciiImpl(true, "<br>", output); |
output->append("</PRE>"); |
} |
-void SparseHistogram::WriteAscii(string* output) const { |
+void SparseHistogram::WriteAscii(std::string* output) const { |
WriteAsciiImpl(true, "\n", output); |
} |
@@ -84,11 +82,11 @@ bool SparseHistogram::SerializeInfoImpl(Pickle* pickle) const { |
return pickle->WriteString(histogram_name()) && pickle->WriteInt(flags()); |
} |
-SparseHistogram::SparseHistogram(const string& name) |
+SparseHistogram::SparseHistogram(const std::string& name) |
: HistogramBase(name) {} |
HistogramBase* SparseHistogram::DeserializeInfoImpl(PickleIterator* iter) { |
- string histogram_name; |
+ std::string histogram_name; |
int flags; |
if (!iter->ReadString(&histogram_name) || !iter->ReadInt(&flags)) { |
DLOG(ERROR) << "Pickle error decoding Histogram: " << histogram_name; |
@@ -129,8 +127,7 @@ void SparseHistogram::WriteAsciiImpl(bool graph_it, |
Count largest_count = 0; |
Sample largest_sample = 0; |
scoped_ptr<SampleCountIterator> it = snapshot->Iterator(); |
- while (!it->Done()) |
- { |
+ while (!it->Done()) { |
Sample min; |
Sample max; |
Count count; |
@@ -145,15 +142,14 @@ void SparseHistogram::WriteAsciiImpl(bool graph_it, |
// iterate over each item and display them |
it = snapshot->Iterator(); |
- while (!it->Done()) |
- { |
+ while (!it->Done()) { |
Sample min; |
Sample max; |
Count count; |
it->Get(&min, &max, &count); |
// value is min, so display it |
- string range = GetSimpleAsciiBucketRange(min); |
+ std::string range = GetSimpleAsciiBucketRange(min); |
output->append(range); |
for (size_t j = 0; range.size() + j < print_width + 1; ++j) |
output->push_back(' '); |