Commit 0dffe41c authored by lizeb's avatar lizeb Committed by Commit bot

customtabs: Enable first contentful paint reporting.

This removes the code to selectively enable reporting, and enables the
reporting. It was blocked by crbug.com/630303, which is now fixed.

BUG=630303

Review-Url: https://codereview.chromium.org/2364033002
Cr-Commit-Position: refs/heads/master@{#420624}
parent 7027cefe
......@@ -105,8 +105,6 @@ public class CustomTabsConnection {
private final AtomicBoolean mWarmupHasBeenCalled = new AtomicBoolean();
private final AtomicBoolean mWarmupHasBeenFinished = new AtomicBoolean();
private ExternalPrerenderHandler mExternalPrerenderHandler;
// TODO(lizeb): Remove once crbug.com/630303 is fixed.
private boolean mPageLoadMetricsEnabled;
/**
* <strong>DO NOT CALL</strong>
......@@ -562,12 +560,6 @@ public class CustomTabsConnection {
return true;
}
// TODO(lizeb): Remove once crbug.com/630303 is fixed.
@VisibleForTesting
void enablePageLoadMetricsCallbacks() {
mPageLoadMetricsEnabled = true;
}
/**
* Notifies the application of a page load metric.
*
......@@ -580,7 +572,6 @@ public class CustomTabsConnection {
*/
boolean notifyPageLoadMetric(CustomTabsSessionToken session, String metricName, long offsetMs) {
CustomTabsCallback callback = mClientManager.getCallbackForSession(session);
if (!mPageLoadMetricsEnabled) return false;
if (callback == null) return false;
Bundle args = new Bundle();
args.putLong(metricName, offsetMs);
......
......@@ -827,10 +827,6 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
@SmallTest
@RetryOnFailure
public void testPageLoadMetricIsSent() {
Context context = getInstrumentation().getTargetContext().getApplicationContext();
CustomTabsConnection connection = CustomTabsConnection.getInstance((Application) context);
connection.enablePageLoadMetricsCallbacks();
final AtomicReference<Long> firstContentfulPaintMs = new AtomicReference<>(-1L);
CustomTabsCallback cb = new CustomTabsCallback() {
@Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment