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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadInfo.java

Issue 2647343005: [Download Home] Fix for 0 seconds remaining (Closed)
Patch Set: qinmin@ comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import org.chromium.base.annotations.CalledByNative; 7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.content_public.browser.DownloadState; 8 import org.chromium.content_public.browser.DownloadState;
9 9
10 /** 10 /**
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return mContentDisposition; 113 return mContentDisposition;
114 } 114 }
115 115
116 /** 116 /**
117 * @return percent completed as an integer, -1 if there is no download progr ess. 117 * @return percent completed as an integer, -1 if there is no download progr ess.
118 */ 118 */
119 public int getPercentCompleted() { 119 public int getPercentCompleted() {
120 return mPercentCompleted; 120 return mPercentCompleted;
121 } 121 }
122 122
123 /**
124 * @return Remaining download time in milliseconds or -1 if it is unknown.
125 */
123 public long getTimeRemainingInMillis() { 126 public long getTimeRemainingInMillis() {
124 return mTimeRemainingInMillis; 127 return mTimeRemainingInMillis;
125 } 128 }
126 129
127 public boolean isResumable() { 130 public boolean isResumable() {
128 return mIsResumable; 131 return mIsResumable;
129 } 132 }
130 133
131 public boolean isPaused() { 134 public boolean isPaused() {
132 return mIsPaused; 135 return mIsPaused;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 .setIsResumable(isResumable) 335 .setIsResumable(isResumable)
333 .setMimeType(remappedMimeType) 336 .setMimeType(remappedMimeType)
334 .setOriginalUrl(originalUrl) 337 .setOriginalUrl(originalUrl)
335 .setPercentCompleted(percentCompleted) 338 .setPercentCompleted(percentCompleted)
336 .setReferrer(referrerUrl) 339 .setReferrer(referrerUrl)
337 .setState(state) 340 .setState(state)
338 .setTimeRemainingInMillis(timeRemainingInMs) 341 .setTimeRemainingInMillis(timeRemainingInMs)
339 .setUrl(url).build(); 342 .setUrl(url).build();
340 } 343 }
341 } 344 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698