| Index: chrome/android/java/src/org/chromium/chrome/browser/util/UrlUtilities.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/UrlUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/UrlUtilities.java
|
| index a24ef1630657dc0ab846565e35293e68ec9b3ddd..76e86b2efa34ad2b29560fc8157f7459874fe79a 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/util/UrlUtilities.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/UrlUtilities.java
|
| @@ -192,6 +192,15 @@ public class UrlUtilities {
|
| }
|
|
|
| /**
|
| + * Determines whether or not the given URLs have the same host.
|
| + * Unlike the above sameDomainOrHost(...) method, this does a simpler host matching, so
|
| + * http://news.google.com and http://finance.google.com do not have the same host.
|
| + */
|
| + public static boolean sameHost(String primaryUrl, String secondaryUrl) {
|
| + return nativeSameHost(primaryUrl, secondaryUrl);
|
| + }
|
| +
|
| + /**
|
| * This function works by calling net::registry_controlled_domains::GetDomainAndRegistry
|
| *
|
| * @param uri A URI
|
| @@ -369,6 +378,7 @@ public class UrlUtilities {
|
|
|
| private static native boolean nativeSameDomainOrHost(String primaryUrl, String secondaryUrl,
|
| boolean includePrivateRegistries);
|
| + private static native boolean nativeSameHost(String primaryUrl, String secondaryUrl);
|
| private static native String nativeGetDomainAndRegistry(String url,
|
| boolean includePrivateRegistries);
|
| public static native boolean nativeIsGoogleSearchUrl(String url);
|
|
|