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

Unified Diff: ui/events/latency_info.cc

Issue 140663003: Removed requirement for the renderer to know it's process ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased and addressed feedback from jamesr@ Created 6 years, 11 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
« ui/events/latency_info.h ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index dd5e11c3141899d3a1350a6def8fc30950b4a281..fe32ed3327bd4868bdb55001fc7b01ad4bf3d2ad 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -248,4 +248,29 @@ void LatencyInfo::TraceEventType(const char* event_type) {
event_type);
}
+void LatencyInfo::FixMissingComponentIds(int64 component_id) {
+ LatencyMap::iterator lc = latency_components.begin();
+ while (lc != latency_components.end()) {
+ LatencyComponentType component_type = lc->first.first;
+ if (component_type == WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT) {
+ // If the component's ID is 0, patch it with the
+ // correct value.
+ if (lc->first.second == 0) {
+ // Generate a new component entry
+ LatencyMap::key_type key = std::make_pair(component_type, component_id);
+ latency_components[key] = lc->second;
+
+ // Remove the old entry
+ LatencyMap::iterator eraseIter = lc;
+ ++lc;
+ latency_components.erase(eraseIter);
jbauman 2014/01/17 00:02:29 how about "latency_components.erase(lc++);" instea
+
+ continue;
+ }
+ }
+
+ ++lc;
+ }
+}
+
} // namespace ui
« ui/events/latency_info.h ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698