Commit 090e4e26 authored by Marcin Wiącek's avatar Marcin Wiącek Committed by Commit Bot

Use TimeUtils constant instead of own in the ContextualSearchManager.

Change-Id: I77f70ae66a1e294516c229bfcb72e02198458a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1587018Reviewed-by: default avatarDonn Denman <donnd@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#654770}
parent 6a9e4a1b
...@@ -15,6 +15,7 @@ import android.view.ViewTreeObserver.OnGlobalFocusChangeListener; ...@@ -15,6 +15,7 @@ import android.view.ViewTreeObserver.OnGlobalFocusChangeListener;
import org.chromium.base.Log; import org.chromium.base.Log;
import org.chromium.base.ObserverList; import org.chromium.base.ObserverList;
import org.chromium.base.SysUtils; import org.chromium.base.SysUtils;
import org.chromium.base.TimeUtils;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.metrics.RecordUserAction;
...@@ -116,8 +117,6 @@ public class ContextualSearchManager ...@@ -116,8 +117,6 @@ public class ContextualSearchManager
// an existing tap-selection. // an existing tap-selection.
private static final int TAP_ON_TAP_SELECTION_DELAY_MS = 100; private static final int TAP_ON_TAP_SELECTION_DELAY_MS = 100;
private static final int NANOSECONDS_IN_A_MILLISECOND = 1000000;
private final ObserverList<ContextualSearchObserver> mObservers = private final ObserverList<ContextualSearchObserver> mObservers =
new ObserverList<ContextualSearchObserver>(); new ObserverList<ContextualSearchObserver>();
...@@ -1419,7 +1418,8 @@ public class ContextualSearchManager ...@@ -1419,7 +1418,8 @@ public class ContextualSearchManager
&& tapTimeNanoseconds > 0) { && tapTimeNanoseconds > 0) {
delayBeforeFinishingWorkMs = ContextualSearchFieldTrial.getValue( delayBeforeFinishingWorkMs = ContextualSearchFieldTrial.getValue(
ContextualSearchSetting.WAIT_AFTER_TAP_DELAY_MS) ContextualSearchSetting.WAIT_AFTER_TAP_DELAY_MS)
- (System.nanoTime() - tapTimeNanoseconds) / NANOSECONDS_IN_A_MILLISECOND; - (System.nanoTime() - tapTimeNanoseconds)
/ TimeUtils.NANOSECONDS_PER_MILLISECOND;
} }
// Finish work on the current state, either immediately or with a delay. // Finish work on the current state, either immediately or with a delay.
......
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