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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceBase.cpp

Issue 2610063006: Create TaskAttributionTiming PerformanceEntry for attribution in PerformanceLongTaskTiming. Move cu… (Closed)
Patch Set: update copyright year Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 PerformanceEntryVector PerformanceBase::getEntriesByType( 129 PerformanceEntryVector PerformanceBase::getEntriesByType(
130 const String& entryType) { 130 const String& entryType) {
131 PerformanceEntryVector entries; 131 PerformanceEntryVector entries;
132 PerformanceEntry::EntryType type = 132 PerformanceEntry::EntryType type =
133 PerformanceEntry::toEntryTypeEnum(entryType); 133 PerformanceEntry::toEntryTypeEnum(entryType);
134 134
135 switch (type) { 135 switch (type) {
136 case PerformanceEntry::Invalid: 136 case PerformanceEntry::Invalid:
137 return entries; 137 return entries;
138 // Unsupported for LongTask, TaskAttribution.
139 // Per the spec, these entries can only be accessed via
140 // Performance Observer. No separate buffer is maintained.
138 case PerformanceEntry::LongTask: 141 case PerformanceEntry::LongTask:
tdresser 2017/01/05 13:34:14 I'd be tempted to stick these cases at the bottom
panicker 2017/01/05 20:56:49 Done.
139 // Unsupported for LongTask. Per the spec, Long task entries can only be 142 return entries;
140 // accessed via Performance Observer. No separate buffer is maintained. 143 case PerformanceEntry::TaskAttribution:
141 return entries; 144 return entries;
142 case PerformanceEntry::Resource: 145 case PerformanceEntry::Resource:
143 for (const auto& resource : m_resourceTimingBuffer) 146 for (const auto& resource : m_resourceTimingBuffer)
144 entries.append(resource); 147 entries.append(resource);
145 break; 148 break;
146 case PerformanceEntry::Navigation: 149 case PerformanceEntry::Navigation:
147 if (m_navigationTiming) 150 if (m_navigationTiming)
148 entries.append(m_navigationTiming); 151 entries.append(m_navigationTiming);
149 break; 152 break;
150 case PerformanceEntry::Composite: 153 case PerformanceEntry::Composite:
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 visitor->trace(m_resourceTimingBuffer); 575 visitor->trace(m_resourceTimingBuffer);
573 visitor->trace(m_navigationTiming); 576 visitor->trace(m_navigationTiming);
574 visitor->trace(m_userTiming); 577 visitor->trace(m_userTiming);
575 visitor->trace(m_observers); 578 visitor->trace(m_observers);
576 visitor->trace(m_activeObservers); 579 visitor->trace(m_activeObservers);
577 visitor->trace(m_suspendedObservers); 580 visitor->trace(m_suspendedObservers);
578 EventTargetWithInlineData::trace(visitor); 581 EventTargetWithInlineData::trace(visitor);
579 } 582 }
580 583
581 } // namespace blink 584 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698