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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java

Issue 2522593010: Remove warnings in org.chromium.chrome.browser.ntp.* code and JUnit tests. (Closed)
Patch Set: review Created 4 years, 1 month 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/ntp/snippets/SnippetArticle.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
index cb844104663a4cc6eed0ded980583984f27484af..6bcd4d41dde35693146262ae324eacb0f205da68 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetArticle.java
@@ -134,20 +134,22 @@ public class SnippetArticle {
}
/**
- * @return the asset download path. May only be called if {@link mIsAssetDownload} is
- * {@code true} and this snippet belongs to DOWNLOADS category.
+ * @return the asset download path. May only be called if {@link #mIsAssetDownload} is
+ * {@code true} (which implies that this snippet belongs to the DOWNLOADS category).
*/
public File getAssetDownloadFile() {
assert isDownload();
+ assert mIsAssetDownload;
return mAssetDownloadFile;
}
/**
- * @return the mime type of the asset download. May only be called if {@link mIsAssetDownload}
- * is {@code true} and this snippet belongs to DOWNLOADS category.
+ * @return the mime type of the asset download. May only be called if {@link #mIsAssetDownload}
+ * is {@code true} (which implies that this snippet belongs to the DOWNLOADS category).
*/
public String getAssetDownloadMimeType() {
assert isDownload();
+ assert mIsAssetDownload;
return mAssetDownloadMimeType;
}

Powered by Google App Engine
This is Rietveld 408576698