Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index 69c0285241dd88a71e726ed7bb3c5e512362f0e2..a4ef30f3b37c476d715724e911ae7dc0fdf21447 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -2155,4 +2155,37 @@ void WebLocalFrameImpl::clearActiveFindMatch() |
ensureTextFinder().clearActiveFindMatch(); |
} |
+void WebLocalFrameImpl::usageCountChromeLoadTimes(const WebString& metric) |
+{ |
+ UseCounter::Feature feature = UseCounter::ChromeLoadTimesUnknown; |
+ if (metric == "requestTime") { |
+ feature = UseCounter::ChromeLoadTimesRequestTime; |
+ } else if (metric == "startLoadTime") { |
+ feature = UseCounter::ChromeLoadTimesStartLoadTime; |
+ } else if (metric == "commitLoadTime") { |
+ feature = UseCounter::ChromeLoadTimesCommitLoadTime; |
+ } else if (metric == "finishDocumentLoadTime") { |
+ feature = UseCounter::ChromeLoadTimesFinishDocumentLoadTime; |
+ } else if (metric == "finishLoadTime") { |
+ feature = UseCounter::ChromeLoadTimesFinishLoadTime; |
+ } else if (metric == "firstPaintTime") { |
+ feature = UseCounter::ChromeLoadTimesFirstPaintTime; |
+ } else if (metric == "firstPaintAfterLoadTime") { |
+ feature = UseCounter::ChromeLoadTimesFirstPaintAfterLoadTime; |
+ } else if (metric == "navigationType") { |
+ feature = UseCounter::ChromeLoadTimesNavigationType; |
+ } else if (metric == "wasFetchedViaSpdy") { |
+ feature = UseCounter::ChromeLoadTimesWasFetchedViaSpdy; |
+ } else if (metric == "wasNpnNegotiated") { |
+ feature = UseCounter::ChromeLoadTimesWasNpnNegotiated; |
+ } else if (metric == "npnNegotiatedProtocol") { |
+ feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
+ } else if (metric == "wasAlternateProtocolAvailable") { |
+ feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
+ } else if (metric == "connectionInfo") { |
+ feature = UseCounter::ChromeLoadTimesConnectionInfo; |
+ } |
+ UseCounter::count(frame(), feature); |
+} |
+ |
} // namespace blink |