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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java

Issue 1561663002: Use long for times and timestamps throught Java cast code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 11 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: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java
index 3982cf611f4c5b9de2f9ab6cb92fd2ce81ec6ce7..cfe299ceaee8a806578d08798d0c63dc91cc6338 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteVideoInfo.java
@@ -45,7 +45,7 @@ public class RemoteVideoInfo {
/**
* The duration of the video
*/
- public int durationMillis;
+ public long durationMillis;
/**
* The current state of the video
*/
@@ -53,7 +53,7 @@ public class RemoteVideoInfo {
/**
* The last known position in the video
*/
- public int currentTimeMillis;
+ public long currentTimeMillis;
/**
* The current error message, if any
*/
@@ -68,8 +68,8 @@ public class RemoteVideoInfo {
* @param currentTimeMillis
* @param errorMessage
*/
- public RemoteVideoInfo(String title, int durationMillis, PlayerState state,
- int currentTimeMillis, String errorMessage) {
+ public RemoteVideoInfo(String title, long durationMillis, PlayerState state,
+ long currentTimeMillis, String errorMessage) {
this.title = title;
this.durationMillis = durationMillis;
this.state = state;
@@ -105,8 +105,10 @@ public class RemoteVideoInfo {
@Override
public int hashCode() {
- int result = durationMillis;
- result = 31 * result + currentTimeMillis;
+ int result = (int) durationMillis;
+ result = 31 * result + (int) (durationMillis >> 32);
+ result = 31 * result + (int) currentTimeMillis;
+ result = 31 * result + (int) (currentTimeMillis >> 32);
result = 31 * result + (title == null ? 0 : title.hashCode());
result = 31 * result + (state == null ? 0 : state.hashCode());
result = 31 * result + (errorMessage == null ? 0 : errorMessage.hashCode());

Powered by Google App Engine
This is Rietveld 408576698