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

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

Issue 2843073002: Remove the GUID requirement from the ContentId (Closed)
Patch Set: Created 3 years, 8 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/DownloadSharedPreferenceEntry.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java
index 1ed6241dd1d691e3028155da581dd6cf97474c10..b9bd93cac66b2fb7e73e910efa778e4096cfe2dc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java
@@ -265,12 +265,12 @@ public class DownloadSharedPreferenceEntry {
static DownloadSharedPreferenceEntry parseFromVersion6(String string) {
String[] entries = string.split(",", 9);
if (entries.length != 9) return INVALID_ENTRY;
- // VERSION,NOTIFICATIONID,NAMESPACE,GUID,OFFTHERECORD,METEREDOK,AUTORESUMEOK,ISTRANSIENT,
+ // VERSION,NOTIFICATIONID,NAMESPACE,ID,OFFTHERECORD,METEREDOK,AUTORESUMEOK,ISTRANSIENT,
// FILENAME
String stringVersion = entries[0];
String stringNotificationId = entries[1];
String stringNamespace = entries[2];
- String stringGuid = entries[3];
+ String stringId = entries[3];
String stringOffTheRecord = entries[4];
String stringMetered = entries[5];
String stringAutoResume = entries[6];
@@ -291,10 +291,10 @@ public class DownloadSharedPreferenceEntry {
}
if (version != 6) return INVALID_ENTRY;
- if (!isValidGUID(stringGuid)) return INVALID_ENTRY;
+ if (TextUtils.isEmpty(stringId)) return INVALID_ENTRY;
if (TextUtils.isEmpty(stringNamespace)) return INVALID_ENTRY;
- return new DownloadSharedPreferenceEntry(new ContentId(stringNamespace, stringGuid),
+ return new DownloadSharedPreferenceEntry(new ContentId(stringNamespace, stringId),
notificationId, offTheRecord, metered, stringFileName, autoResume, isTransient);
}

Powered by Google App Engine
This is Rietveld 408576698