Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| index 3b3bb8822a169659229e92db6f9068fe6a5f8152..a6f2d9ae91c8df7ddb924d650bde59a36e0624f2 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| @@ -98,6 +98,9 @@ public class NewTabPage |
| // The timestamp at which this NTP was last shown to the user. |
| private long mLastShownTimeNs; |
| + // False until the NTP has been shown to the user for the first time. |
| + private boolean mHasBeenShownBefore; |
| + |
| private boolean mIsLoaded; |
| // Whether destroy() has been called. |
| @@ -507,6 +510,11 @@ public class NewTabPage |
| private void recordNTPShown() { |
| mLastShownTimeNs = System.nanoTime(); |
| RecordUserAction.record("MobileNTPShown"); |
| + if (mHasBeenShownBefore) { |
|
Michael van Ouwerkerk
2017/03/13 16:42:56
I don't understand the intention of this variable
dgn
2017/03/13 16:46:11
nit: the java style is inline return
fhorschig
2017/03/13 16:57:47
Sorry, I didn't check the git-cl-format output.
fhorschig
2017/03/13 16:57:47
Yes, inverted the logic again.
Thanks for spotting
|
| + return; |
| + } |
| + RecordUserAction.record("MobileNTPVisitedAgain"); |
| + mHasBeenShownBefore = true; |
| } |
| private void recordNTPInteractionTime() { |