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

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

Issue 346753004: [Android] Expose more GoogleUtils to Java. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/android/url_utilities.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java
index 00c6347ae36847f98441ef2f1ed3b6e9f5423fa3..ee9df01e3d2a03c1f636454cdc0c2e68cf77076b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java
@@ -197,6 +197,15 @@ public class UrlUtilities {
return nativeGetDomainAndRegistry(uri, includePrivateRegistries);
}
+ /**
+ * @param url A URL.
+ * @return Whether a given URL is one of [...]google.TLD or [...]youtube.TLD URLs.
+ */
+ public static boolean isGooglePropertyUrl(String url) {
+ if (TextUtils.isEmpty(url)) return false;
+ return nativeIsGooglePropertyUrl(url);
+ }
+
private static native boolean nativeSameDomainOrHost(String primaryUrl, String secondaryUrl,
boolean includePrivateRegistries);
private static native String nativeGetDomainAndRegistry(String url,
@@ -204,4 +213,5 @@ public class UrlUtilities {
public static native boolean nativeIsGoogleSearchUrl(String url);
public static native boolean nativeIsGoogleHomePageUrl(String url);
public static native String nativeFixupUrl(String url, String desiredTld);
+ private static native boolean nativeIsGooglePropertyUrl(String url);
}
« no previous file with comments | « no previous file | chrome/browser/android/url_utilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698