Bug 1265708 - Pre: make getForURLs arguments more generic r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Thu, 02 Jun 2016 14:25:05 -0700
changeset 341422 1888dfa820b765ff63f7a5c1c223857100fe9d98
parent 341421 dc03fe0bad2a83df21395abee0a0574387642982
child 341423 971e29d3b65c788142eb09b900c98279fd38a732
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [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: make getForURLs arguments more generic r=sebastian MozReview-Commit-ID: IkPiLVB5mop
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/db/LocalURLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
@@ -1,16 +1,17 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 package org.mozilla.gecko.db;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -119,17 +120,17 @@ public class LocalURLMetadata implements
     }
 
     /**
      * Returns an unmodifiable Map of url->Metadata (i.e. A second HashMap) for a list of urls.
      * Must not be called from UI or Gecko threads.
      */
     @Override
     public Map<String, Map<String, Object>> getForURLs(final ContentResolver cr,
-                                                       final List<String> urls,
+                                                       final Collection<String> urls,
                                                        final List<String> requestedColumns) {
         ThreadUtils.assertNotOnUiThread();
         ThreadUtils.assertNotOnGeckoThread();
 
         final Map<String, Map<String, Object>> data = new HashMap<String, Map<String, Object>>();
 
         // Nothing to query for
         if (urls.isEmpty() || requestedColumns.isEmpty()) {
--- a/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
@@ -39,17 +39,17 @@ class StubURLMetadata implements URLMeta
     public StubURLMetadata() {
     }
 
     public Map<String, Object> fromJSON(JSONObject obj) {
         return new HashMap<String, Object>();
     }
 
     public Map<String, Map<String, Object>> getForURLs(final ContentResolver cr,
-                                                       final List<String> urls,
+                                                       final Collection<String> urls,
                                                        final List<String> columns) {
         return new HashMap<String, Map<String, Object>>();
     }
 
     public void save(final ContentResolver cr, final Map<String, Object> data) {
     }
 }
 
--- a/mobile/android/base/java/org/mozilla/gecko/db/URLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/URLMetadata.java
@@ -1,21 +1,22 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 package org.mozilla.gecko.db;
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 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 Collection<String> urls,
                                                        final List<String> columns);
     public void save(final ContentResolver cr, final Map<String, Object> data);
 }