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

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: address review comments 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
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698