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

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

Issue 2601273003: Send users to Physical WebUI instead of Activity (Closed)
Patch Set: Rebase Created 3 years, 11 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/PhysicalWeb.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
index ba594a7a5f10007f4b9df8857d5e251177356bc2..6049aef4918630cdf72b7aba87b766e9934cea34 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java
@@ -4,11 +4,14 @@
package org.chromium.chrome.browser.physicalweb;
+import android.content.Intent;
import android.content.SharedPreferences;
+import android.net.Uri;
import android.os.Build;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.browser.ChromeFeatureList;
+import org.chromium.chrome.browser.UrlConstants;
import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.search_engines.TemplateUrlService;
@@ -146,4 +149,13 @@ public class PhysicalWeb {
&& TemplateUrlService.getInstance().isDefaultSearchEngineGoogle()
&& !Profile.getLastUsedProfile().isOffTheRecord();
}
+
+ /**
+ * Creates an Intent that sends the user to the list of Physical Web URLs.
+ */
+ public static Intent createListUrlsIntent() {
+ return new Intent(Intent.ACTION_VIEW)
+ .addCategory(Intent.CATEGORY_BROWSABLE)
+ .setData(Uri.parse(UrlConstants.PHYSICAL_WEB_URL));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698