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

Unified Diff: chrome/browser/android/url_utilities.cc

Issue 2110543004: Move JNI bindings for url_formatter from chrome to //components/url_formatter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/url_utilities.cc
diff --git a/chrome/browser/android/url_utilities.cc b/chrome/browser/android/url_utilities.cc
index fb10303bc1463360ef864d71a7ab329bd5285929..cc7d3d1f63fb9a8ee1e22a72e24f1b250e482d16 100644
--- a/chrome/browser/android/url_utilities.cc
+++ b/chrome/browser/android/url_utilities.cc
@@ -7,8 +7,6 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "components/google/core/browser/google_util.h"
-#include "components/url_formatter/elide_url.h"
-#include "components/url_formatter/url_fixer.h"
#include "jni/UrlUtilities_jni.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "url/gurl.h"
@@ -108,25 +106,6 @@ static jboolean IsGoogleSearchUrl(JNIEnv* env,
return google_util::IsGoogleSearchUrl(gurl);
}
-static ScopedJavaLocalRef<jstring> FormatUrlForSecurityDisplay(
- JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- const JavaParamRef<jstring>& url) {
- return base::android::ConvertUTF16ToJavaString(
- env, url_formatter::FormatUrlForSecurityDisplay(
- ConvertJavaStringToGURL(env, url)));
-}
-
-static ScopedJavaLocalRef<jstring> FormatUrlForSecurityDisplayOmitScheme(
- JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- const JavaParamRef<jstring>& url) {
- return base::android::ConvertUTF16ToJavaString(
- env, url_formatter::FormatUrlForSecurityDisplay(
- ConvertJavaStringToGURL(env, url),
- url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS));
-}
-
static jboolean IsGoogleHomePageUrl(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jstring>& url) {
@@ -136,23 +115,6 @@ static jboolean IsGoogleHomePageUrl(JNIEnv* env,
return google_util::IsGoogleHomePageUrl(gurl);
}
-static ScopedJavaLocalRef<jstring> FixupUrl(
- JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- const JavaParamRef<jstring>& url,
- const JavaParamRef<jstring>& optional_desired_tld) {
- DCHECK(url);
- GURL fixed_url = url_formatter::FixupURL(
- base::android::ConvertJavaStringToUTF8(env, url),
- optional_desired_tld
- ? base::android::ConvertJavaStringToUTF8(env, optional_desired_tld)
- : std::string());
-
- return fixed_url.is_valid()
- ? base::android::ConvertUTF8ToJavaString(env, fixed_url.spec())
- : ScopedJavaLocalRef<jstring>();
-}
-
static jboolean UrlsMatchIgnoringFragments(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jstring>& url,
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698