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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java

Issue 1821823003: Add a UrlInfo class for the Physical Web (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add VisibleForTesting to removeUrl Created 4 years, 8 months 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/physicalweb/PhysicalWebDiagnosticsPage.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
index 29e7846a7fda591378753383ebf2899986356576..f51511ee8418f9b4f31f347626736a444ccab8fd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java
@@ -156,9 +156,9 @@ public class PhysicalWebDiagnosticsPage implements NativePage {
private void appendUrlManagerReport(StringBuilder sb) {
UrlManager urlManager = UrlManager.getInstance(mContext);
- Set<String> nearbyUrls = urlManager.getCachedNearbyUrls();
- Set<String> resolvedUrls = urlManager.getCachedResolvedUrls();
- Set<String> union = new HashSet<String>(nearbyUrls);
+ Set<UrlInfo> nearbyUrls = new HashSet<UrlInfo>(urlManager.getCachedNearbyUrls());
+ Set<UrlInfo> resolvedUrls = new HashSet<UrlInfo>(urlManager.getCachedResolvedUrls());
+ Set<UrlInfo> union = new HashSet<UrlInfo>(nearbyUrls);
union.addAll(resolvedUrls);
sb.append("<h2>Nearby web pages</h2>");
@@ -166,7 +166,7 @@ public class PhysicalWebDiagnosticsPage implements NativePage {
if (union.isEmpty()) {
sb.append("No nearby web pages found<br/>");
} else {
- for (String url : union) {
+ for (UrlInfo url : union) {
boolean isNearby = nearbyUrls.contains(url);
boolean isResolved = resolvedUrls.contains(url);

Powered by Google App Engine
This is Rietveld 408576698