Add a ToString() method to StatsReport::Value.
This is an interface change only at this point which will be followed up by a matching change in Chromium that removes the dependency on the 'value' member variable. Once that's been done, I'll add native support for non-string types in the Value class. R=magjed@webrtc.org BUG=2822 Review URL: https://webrtc-codereview.appspot.com/40139004 Cr-Commit-Position: refs/heads/master@{#8550} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8550 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
50b2295091
commit
afa6d16a05
@ -444,6 +444,10 @@ const char* StatsReport::Value::display_name() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string& StatsReport::Value::ToString() const {
|
||||
return value;
|
||||
}
|
||||
|
||||
StatsReport::StatsReport(scoped_ptr<Id> id) : id_(id.Pass()), timestamp_(0.0) {
|
||||
ASSERT(id_.get());
|
||||
}
|
||||
|
@ -240,6 +240,7 @@ class StatsReport {
|
||||
|
||||
// Returns the string representation of |name|.
|
||||
const char* display_name() const;
|
||||
const std::string& ToString() const;
|
||||
|
||||
const StatsValueName name;
|
||||
// TODO(tommi): Support more value types than string.
|
||||
|
Loading…
x
Reference in New Issue
Block a user