| Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/NearbyUrlsAdapter.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/NearbyUrlsAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/NearbyUrlsAdapter.java
|
| index ab900b8dfb241c63ce4d79537ea3bee69ee52695..f01caabc40de642026eddb949f7dc4edab078296 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/NearbyUrlsAdapter.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/NearbyUrlsAdapter.java
|
| @@ -81,4 +81,21 @@ class NearbyUrlsAdapter extends ArrayAdapter<PwsResult> {
|
|
|
| return view;
|
| }
|
| +
|
| + /**
|
| + * Gets whether the specified site URL is in the list.
|
| + * @param siteUrl A string containing the site URL.
|
| + * @return Boolean true if the specified site URL is already in the list.
|
| + */
|
| + public boolean hasSiteUrl(String siteUrl) {
|
| + int itemCount = getCount();
|
| + for (int position = 0; position < itemCount; ++position) {
|
| + PwsResult pwsResult = getItem(position);
|
| + if (siteUrl.equals(pwsResult.siteUrl)) {
|
| + return true;
|
| + }
|
| + }
|
| +
|
| + return false;
|
| + }
|
| }
|
|
|