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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2023903003: [WIP] Add WebCore.UseCounter UMA to supercede FeatureObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 82058afac1f57815432cc43513d18efd05ce3340..0e5f314eaa059d9cb9cb2285a4b92c0c24ff84c7 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -465,14 +465,21 @@ void Page::updateAcceleratedCompositingSettings()
}
}
-void Page::didCommitLoad(LocalFrame* frame)
+void Page::didCommitLoad()
{
+ useCounter().didCommitLoad();
+ frameHost().visualViewport().sendUMAMetrics();
+}
+
+void Page::deprecatedDidCommitFrameLoad(LocalFrame* frame)
+{
+ // This method can be invoked at surprising times. Most logic probably wants to move
+ // into didCommitLoad.
notifyDidCommitLoad(frame);
if (m_mainFrame == frame) {
frame->console().clearMessages();
- useCounter().didCommitLoad();
+ useCounter().deprecatedDidCommitFrameLoad();
deprecation().clearSuppression();
- frameHost().visualViewport().sendUMAMetrics();
m_hostsUsingFeatures.updateMeasurementsAndClear();
UserGestureIndicator::clearProcessedUserGestureSinceLoad();
}

Powered by Google App Engine
This is Rietveld 408576698