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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java

Issue 2688243002: Make all member variables in DownloadNotificationService final (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
index 737dd84c23e7f77ce2df6154e81bfc04c1573d11..90b542d3d1a49548623d9a3c22793c5df7626bbb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
@@ -640,15 +640,15 @@ public class DownloadNotificationService extends Service {
return;
}
} else if (intent.getAction() == ACTION_DOWNLOAD_RESUME) {
- boolean metered = DownloadManagerService.isActiveNetworkMetered(mContext);
- if (!entry.canDownloadWhileMetered) {
- // If user manually resumes a download, update the network type if it
- // is not metered previously.
- entry.canDownloadWhileMetered = metered;
- }
- entry.isAutoResumable = true;
+ // If user manually resumes a download, update the network type if it
+ // is not metered previously.
+ boolean canDownloadWhileMetered = entry.canDownloadWhileMetered
+ || DownloadManagerService.isActiveNetworkMetered(mContext);
// Update the SharedPreference entry.
- mDownloadSharedPreferenceHelper.addOrReplaceSharedPreferenceEntry(entry);
+ mDownloadSharedPreferenceHelper.addOrReplaceSharedPreferenceEntry(
+ new DownloadSharedPreferenceEntry(entry.notificationId, entry.isOffTheRecord,
+ canDownloadWhileMetered, entry.downloadGuid, entry.fileName,
+ entry.itemType, true));
} else if (intent.getAction() == ACTION_DOWNLOAD_RESUME_ALL
&& (mDownloadSharedPreferenceHelper.getEntries().isEmpty()
|| DownloadManagerService.hasDownloadManagerService())) {
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698