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

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

Issue 2768953002: Initial work to move downloads to ContentIds (Closed)
Patch Set: Rebase because of a conflict... with a single. import. :( Created 3 years, 9 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/download/DownloadBroadcastReceiver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
index 4337aca02a885f396f899efbc37d52a16bfb0af5..3a61b4f3d8040dbfff98cd5cd99bf1987698d88a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
@@ -11,6 +11,7 @@ import android.content.Intent;
import android.net.Uri;
import org.chromium.chrome.browser.util.IntentUtils;
+import org.chromium.components.offline_items_collection.ContentId;
/**
* This {@link BroadcastReceiver} handles clicks to download notifications and their action buttons.
@@ -65,10 +66,9 @@ public class DownloadBroadcastReceiver extends BroadcastReceiver {
intent, DownloadNotificationService.EXTRA_IS_SUPPORTED_MIME_TYPE, false);
boolean isOffTheRecord = IntentUtils.safeGetBooleanExtra(
intent, DownloadNotificationService.EXTRA_IS_OFF_THE_RECORD, false);
- String downloadGuid = IntentUtils.safeGetStringExtra(
- intent, DownloadNotificationService.EXTRA_DOWNLOAD_GUID);
+ ContentId contentId = DownloadNotificationService.getContentIdFromIntent(intent);
DownloadManagerService.openDownloadedContent(
- context, downloadFilename, isSupportedMimeType, isOffTheRecord, downloadGuid, id);
+ context, downloadFilename, isSupportedMimeType, isOffTheRecord, contentId.id, id);
}
/**
« no previous file with comments | « chrome/android/BUILD.gn ('k') | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadInfo.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698