Bug 1300532 - Post: Rename isEnteringReaderMode()'s parameters for more clarity r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Tue, 06 Sep 2016 15:53:06 -0700
changeset 313206 ad0d6c3a73e1684eacf7a6484dee6b2320055404
parent 313205 5c2e946c182a8b755c8c873bc67101df3ce0913f
child 313207 4aac4b3f3b530691053d5f56afd3f0cf9b55b42d
push id30674
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 22:03:48 +0000
treeherdermozilla-central@5d854c8d0765 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1300532
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1300532 - Post: Rename isEnteringReaderMode()'s parameters for more clarity r=sebastian MozReview-Commit-ID: 7Wub31YLGyS
mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
--- a/mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
+++ b/mobile/android/base/java/org/mozilla/gecko/reader/ReaderModeUtils.java
@@ -19,31 +19,31 @@ public class ReaderModeUtils {
      * @see #stripAboutReaderUrl(String) for a safer version that returns the original URL for malformed/invalid
      *     URLs.
      * @return <code>null</code> if the URL is malformed or doesn't contain a URL parameter.
      */
     private static String getUrlFromAboutReader(String aboutReaderUrl) {
         return StringUtils.getQueryParameter(aboutReaderUrl, "url");
     }
 
-    public static boolean isEnteringReaderMode(String currentUrl, String newUrl) {
-        if (currentUrl == null || newUrl == null) {
+    public static boolean isEnteringReaderMode(String oldURL, String newURL) {
+        if (oldURL == null || newURL == null) {
             return false;
         }
 
-        if (!AboutPages.isAboutReader(newUrl)) {
+        if (!AboutPages.isAboutReader(newURL)) {
             return false;
         }
 
-        String urlFromAboutReader = getUrlFromAboutReader(newUrl);
+        String urlFromAboutReader = getUrlFromAboutReader(newURL);
         if (urlFromAboutReader == null) {
             return false;
         }
 
-        return urlFromAboutReader.equals(currentUrl);
+        return urlFromAboutReader.equals(oldURL);
     }
 
     public static String getAboutReaderForUrl(String url) {
         return getAboutReaderForUrl(url, -1);
     }
 
     /**
      * Obtain the underlying URL from an about:reader URL.