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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2222573003: Add use counter for chrome.loadTimes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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

Powered by Google App Engine
This is Rietveld 408576698