Bug 1265708 - Pre: remove unused variable r=sebastian
☠☠ backed out by e1fb7ee96e4e ☠ ☠
authorAndrzej Hunt <ahunt@mozilla.com>
Thu, 02 Jun 2016 13:51:52 -0700
changeset 339383 f685593ac3cc4ea3b8d6545e42eb7d225095161a
parent 339382 d1c3952c299da44bbb1215d73a5c34118f92279e
child 339384 974090a524da56fad3b8045b19461e9ae6817529
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1265708
milestone49.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 1265708 - Pre: remove unused variable r=sebastian We already pass the URL inside the JSON object. MozReview-Commit-ID: J4RjxLAzdI
mobile/android/base/java/org/mozilla/gecko/Tab.java
mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
mobile/android/base/java/org/mozilla/gecko/db/URLMetadata.java
--- a/mobile/android/base/java/org/mozilla/gecko/Tab.java
+++ b/mobile/android/base/java/org/mozilla/gecko/Tab.java
@@ -349,17 +349,17 @@ public class Tab {
 
         final ContentResolver cr = mAppContext.getContentResolver();
         final URLMetadata urlMetadata = mDB.getURLMetadata();
 
         final Map<String, Object> data = urlMetadata.fromJSON(metadata);
         ThreadUtils.postToBackgroundThread(new Runnable() {
             @Override
             public void run() {
-                urlMetadata.save(cr, mUrl, data);
+                urlMetadata.save(cr, data);
             }
         });
     }
 
     public ErrorType getErrorType() {
         return mErrorType;
     }
 
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
@@ -204,17 +204,17 @@ public class LocalURLMetadata implements
     }
 
     /**
      * Saves a HashMap of metadata into the database. Will iterate through columns
      * in the Database and only save rows with matching keys in the HashMap.
      * Must not be called from UI or Gecko threads.
      */
     @Override
-    public void save(final ContentResolver cr, final String url, final Map<String, Object> data) {
+    public void save(final ContentResolver cr, final Map<String, Object> data) {
         ThreadUtils.assertNotOnUiThread();
         ThreadUtils.assertNotOnGeckoThread();
 
         try {
             ContentValues values = new ContentValues();
 
             for (String key : COLUMNS) {
                 if (data.containsKey(key)) {
--- a/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
@@ -44,17 +44,17 @@ class StubURLMetadata implements URLMeta
     }
 
     public Map<String, Map<String, Object>> getForURLs(final ContentResolver cr,
                                                        final List<String> urls,
                                                        final List<String> columns) {
         return new HashMap<String, Map<String, Object>>();
     }
 
-    public void save(final ContentResolver cr, final String url, final Map<String, Object> data) {
+    public void save(final ContentResolver cr, final Map<String, Object> data) {
     }
 }
 
 class StubTabsAccessor implements TabsAccessor {
     public StubTabsAccessor() {
     }
 
     @Override
--- a/mobile/android/base/java/org/mozilla/gecko/db/URLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/URLMetadata.java
@@ -12,10 +12,10 @@ import org.json.JSONObject;
 
 import android.content.ContentResolver;
 
 public interface URLMetadata {
     public Map<String, Object> fromJSON(JSONObject obj);
     public Map<String, Map<String, Object>> getForURLs(final ContentResolver cr,
                                                        final List<String> urls,
                                                        final List<String> columns);
-    public void save(final ContentResolver cr, final String url, final Map<String, Object> data);
+    public void save(final ContentResolver cr, final Map<String, Object> data);
 }