| Index: chrome/browser/android/url_utilities.cc
|
| diff --git a/chrome/browser/android/url_utilities.cc b/chrome/browser/android/url_utilities.cc
|
| index 364b0ccdf0113b8ffe8ce317d0bdacb5753fd10b..7167815f188576d37d075107f4aea4cba4e3e9a7 100644
|
| --- a/chrome/browser/android/url_utilities.cc
|
| +++ b/chrome/browser/android/url_utilities.cc
|
| @@ -83,6 +83,21 @@ static jstring FixupUrl(JNIEnv* env,
|
| NULL;
|
| }
|
|
|
| +static jboolean IsGooglePropertyUrl(JNIEnv* env, jclass clazz, jstring url) {
|
| + const GURL gurl = GURL(ConvertJavaStringToUTF8(env, url));
|
| + if (gurl.is_empty() || !gurl.is_valid())
|
| + return false;
|
| + return
|
| + google_util::IsGoogleDomainUrl(
|
| + gurl,
|
| + google_util::ALLOW_SUBDOMAIN,
|
| + google_util::DISALLOW_NON_STANDARD_PORTS) ||
|
| + google_util::IsYoutubeDomainUrl(
|
| + gurl,
|
| + google_util::ALLOW_SUBDOMAIN,
|
| + google_util::DISALLOW_NON_STANDARD_PORTS);
|
| +}
|
| +
|
| // Register native methods
|
| bool RegisterUrlUtilities(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
|
|