OLD | NEW |
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 private long mContentLength; | 160 private long mContentLength; |
161 private boolean mIsGETRequest; | 161 private boolean mIsGETRequest; |
162 private String mDownloadGuid; | 162 private String mDownloadGuid; |
163 private boolean mHasUserGesture; | 163 private boolean mHasUserGesture; |
164 private String mContentDisposition; | 164 private String mContentDisposition; |
165 private int mPercentCompleted = -1; | 165 private int mPercentCompleted = -1; |
166 private long mTimeRemainingInMillis; | 166 private long mTimeRemainingInMillis; |
167 private boolean mIsResumable = true; | 167 private boolean mIsResumable = true; |
168 private boolean mIsPaused; | 168 private boolean mIsPaused; |
169 private boolean mIsOffTheRecord; | 169 private boolean mIsOffTheRecord; |
170 private boolean mIsOfflinePage = false; | 170 private boolean mIsOfflinePage; |
171 private int mState = DownloadState.IN_PROGRESS; | 171 private int mState = DownloadState.IN_PROGRESS; |
172 | 172 |
173 public Builder setUrl(String url) { | 173 public Builder setUrl(String url) { |
174 mUrl = url; | 174 mUrl = url; |
175 return this; | 175 return this; |
176 } | 176 } |
177 | 177 |
178 public Builder setUserAgent(String userAgent) { | 178 public Builder setUserAgent(String userAgent) { |
179 mUserAgent = userAgent; | 179 mUserAgent = userAgent; |
180 return this; | 180 return this; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 .setIsResumable(isResumable) | 332 .setIsResumable(isResumable) |
333 .setMimeType(remappedMimeType) | 333 .setMimeType(remappedMimeType) |
334 .setOriginalUrl(originalUrl) | 334 .setOriginalUrl(originalUrl) |
335 .setPercentCompleted(percentCompleted) | 335 .setPercentCompleted(percentCompleted) |
336 .setReferrer(referrerUrl) | 336 .setReferrer(referrerUrl) |
337 .setState(state) | 337 .setState(state) |
338 .setTimeRemainingInMillis(timeRemainingInMs) | 338 .setTimeRemainingInMillis(timeRemainingInMs) |
339 .setUrl(url).build(); | 339 .setUrl(url).build(); |
340 } | 340 } |
341 } | 341 } |
OLD | NEW |