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

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

Issue 2636103002: [WebAPKs] Show minibar when WebAPK navigates outside scope specified in Web Manifest (Closed)
Patch Set: Merge branch 'master' into minibar 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/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 94f376c8ad7bef623d90c57183d647b3615cfb47..4b2caa82f790088ec83a2872d3a652b8c57b7642 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
@@ -150,6 +150,12 @@ public class UrlUtilities {
return nativeGetDomainAndRegistry(uri, includePrivateRegistries);
}
+ /** Returns whether a URL is within another URL's scope. */
+ @VisibleForTesting
+ public static boolean isUrlWithinScope(String url, String scopeUrl) {
+ return nativeIsUrlWithinScope(url, scopeUrl);
+ }
+
/** @return whether two URLs match, ignoring the #fragment. */
@VisibleForTesting
public static boolean urlsMatchIgnoringFragments(String url, String url2) {
@@ -322,6 +328,7 @@ public class UrlUtilities {
boolean includePrivateRegistries);
public static native boolean nativeIsGoogleSearchUrl(String url);
public static native boolean nativeIsGoogleHomePageUrl(String url);
+ private static native boolean nativeIsUrlWithinScope(String url, String scopeUrl);
private static native boolean nativeUrlsMatchIgnoringFragments(String url, String url2);
private static native boolean nativeUrlsFragmentsDiffer(String url, String url2);
}

Powered by Google App Engine
This is Rietveld 408576698