| Index: ui/base/latency_info.cc
|
| diff --git a/ui/base/latency_info.cc b/ui/base/latency_info.cc
|
| index f87f6dfac23f6880d895fc7ed1632cdbd51380a3..459fc2ab689a3183eede3c51a43042c2542a1c83 100644
|
| --- a/ui/base/latency_info.cc
|
| +++ b/ui/base/latency_info.cc
|
| @@ -58,10 +58,16 @@ void LatencyInfo::AddLatencyNumberWithTimestamp(LatencyComponentType component,
|
| }
|
| }
|
|
|
| -bool LatencyInfo::HasLatencyComponent(LatencyComponentType type,
|
| - int64 id) const {
|
| - return latency_components.find(std::make_pair(type, id)) !=
|
| - latency_components.end();
|
| +bool LatencyInfo::FindLatency(LatencyComponentType type,
|
| + int64 id,
|
| + LatencyComponent* output) const {
|
| + LatencyMap::const_iterator it = latency_components.find(
|
| + std::make_pair(type, id));
|
| + if (it == latency_components.end())
|
| + return false;
|
| + if (output)
|
| + *output = it->second;
|
| + return true;
|
| }
|
|
|
| void LatencyInfo::Clear() {
|
|
|