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

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

Issue 2679933005: 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 c33e7acc7f70378cd74751664b06d4b0ac8c7479..5c50882ed128bac83a9996bd569a77fba966fa28 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
@@ -642,15 +642,15 @@ public class DownloadNotificationService extends Service {
return;
}
} else if (ACTION_DOWNLOAD_RESUME.equals(intent.getAction())) {
- 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 (ACTION_DOWNLOAD_RESUME_ALL.equals(intent.getAction())
&& (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