Commit 7b4f81d7 authored by Marcin Wiacek's avatar Marcin Wiacek Committed by Commit Bot

Typo fixes and updating IntDef inside PageViewTimer

Fix two typos and align IntDef definition to definitions from other files.

Change-Id: I034d3cf27ceb745c5584f3449df1827383ebdefd
Reviewed-on: https://chromium-review.googlesource.com/c/1353994Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#611953}
parent 6a59dc3b
...@@ -25,6 +25,8 @@ import org.chromium.content_public.browser.NavigationController; ...@@ -25,6 +25,8 @@ import org.chromium.content_public.browser.NavigationController;
import org.chromium.content_public.browser.NavigationEntry; import org.chromium.content_public.browser.NavigationEntry;
import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContents;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/** Class allowing to measure and report a page view time in UMA. */ /** Class allowing to measure and report a page view time in UMA. */
...@@ -41,6 +43,7 @@ public class PageViewTimer { ...@@ -41,6 +43,7 @@ public class PageViewTimer {
*/ */
@VisibleForTesting @VisibleForTesting
@IntDef({DurationBucket.SHORT_CLICK, DurationBucket.MEDIUM_CLICK, DurationBucket.LONG_CLICK}) @IntDef({DurationBucket.SHORT_CLICK, DurationBucket.MEDIUM_CLICK, DurationBucket.LONG_CLICK})
@Retention(RetentionPolicy.SOURCE)
public @interface DurationBucket { public @interface DurationBucket {
int SHORT_CLICK = 0; /** Click <= 4 secconds */ int SHORT_CLICK = 0; /** Click <= 4 secconds */
int MEDIUM_CLICK = 1; /** 4 seconds < Click <= 180 seconds */ int MEDIUM_CLICK = 1; /** 4 seconds < Click <= 180 seconds */
...@@ -50,6 +53,7 @@ public class PageViewTimer { ...@@ -50,6 +53,7 @@ public class PageViewTimer {
/** Track the navigation source to report the page view time under. */ /** Track the navigation source to report the page view time under. */
@IntDef({NavigationSource.OTHER, NavigationSource.CONTEXTUAL_SUGGESTIONS}) @IntDef({NavigationSource.OTHER, NavigationSource.CONTEXTUAL_SUGGESTIONS})
@Retention(RetentionPolicy.SOURCE)
public @interface NavigationSource { public @interface NavigationSource {
int OTHER = 0; int OTHER = 0;
int CONTEXTUAL_SUGGESTIONS = 1; int CONTEXTUAL_SUGGESTIONS = 1;
...@@ -61,7 +65,7 @@ public class PageViewTimer { ...@@ -61,7 +65,7 @@ public class PageViewTimer {
/** Observer for the tab switcher, can be null. */ /** Observer for the tab switcher, can be null. */
private OverviewModeObserver mOverviewModeObserver; private OverviewModeObserver mOverviewModeObserver;
/** Currnetly observed tab. */ /** Currently observed tab. */
private Tab mCurrentTab; private Tab mCurrentTab;
/** Last URL loaded in the observed tab. */ /** Last URL loaded in the observed tab. */
private String mLastUrl; private String mLastUrl;
...@@ -76,7 +80,7 @@ public class PageViewTimer { ...@@ -76,7 +80,7 @@ public class PageViewTimer {
private boolean mIsPaused; private boolean mIsPaused;
/** When the timer is paused, track when the pause began. */ /** When the timer is paused, track when the pause began. */
private long mPauseStartTimeMs; private long mPauseStartTimeMs;
/** Keep a cumlative duration of page not being visible. */ /** Keep a cumulative duration of page not being visible. */
private long mPauseDuration; private long mPauseDuration;
public PageViewTimer(TabModelSelector tabModelSelector) { public PageViewTimer(TabModelSelector tabModelSelector) {
......
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