Chromium Code Reviews| 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..d30d78c2fe875d83f7211debbab34b7a5b9319e3 100644 |
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| @@ -2155,4 +2155,49 @@ void WebLocalFrameImpl::clearActiveFindMatch() |
| ensureTextFinder().clearActiveFindMatch(); |
| } |
| +void WebLocalFrameImpl::usageCountChromeLoadtimes(const WebString& metric) |
| +{ |
| + UseCounter::Feature feature; |
| + if (metric == "requestTime") { |
| + feature = UseCounter::ChromeLoadtimesRequestTime; |
| + } |
| + if (metric == "startLoadTime") { |
|
esprehn
2016/08/05 20:57:36
else if, otherwise you're doing tons of comparison
panicker
2016/08/05 23:06:14
Done.
|
| + feature = UseCounter::ChromeLoadtimesStartLoadTime; |
| + } |
| + if (metric == "commitLoadTime") { |
| + feature = UseCounter::ChromeLoadtimesCommitLoadTime; |
| + } |
| + if (metric == "finishDocumentLoadTime") { |
| + feature = UseCounter::ChromeLoadtimesFinishDocumentLoadTime; |
| + } |
| + if (metric == "finishLoadTime") { |
| + feature = UseCounter::ChromeLoadtimesFinishLoadTime; |
| + } |
| + if (metric == "firstPaintTime") { |
| + feature = UseCounter::ChromeLoadtimesFirstPaintTime; |
| + } |
| + if (metric == "firstPaintAfterLoadTime") { |
| + feature = UseCounter::ChromeLoadtimesFirstPaintAfterLoadTime; |
| + } |
| + if (metric == "navigationType") { |
| + feature = UseCounter::ChromeLoadtimesNavigationType; |
| + } |
| + if (metric == "wasFetchedViaSpdy") { |
| + feature = UseCounter::ChromeLoadtimesWasFetchedViaSpdy; |
| + } |
| + if (metric == "wasNpnNegotiated") { |
| + feature = UseCounter::ChromeLoadtimesWasNpnNegotiated; |
| + } |
| + if (metric == "npnNegotiatedProtocol") { |
| + feature = UseCounter::ChromeLoadtimesNpnNegotiatedProtocol; |
| + } |
| + if (metric == "wasAlternateProtocolAvailable") { |
| + feature = UseCounter::ChromeLoadtimesWasAlternateProtocolAvailable; |
| + } |
| + if (metric == "connectionInfo") { |
| + feature = UseCounter::ChromeLoadtimesConnectionInfo; |
| + } |
| + UseCounter::count(frame(), feature); |
| +} |
| + |
| } // namespace blink |