summaryrefslogtreecommitdiffstats
path: root/chrome/browser/android
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2015-08-04 00:05:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-04 07:05:48 +0000
commit90437dd218ba09f01612ebfc47eda167d67fb368 (patch)
tree77d2fe1ff3c1830af96a8e03c32419c5b5634522 /chrome/browser/android
parent31ad3e6a80c367c4f8ea0a921e8f2cfe555a5fd6 (diff)
downloadchromium_src-90437dd218ba09f01612ebfc47eda167d67fb368.zip
chromium_src-90437dd218ba09f01612ebfc47eda167d67fb368.tar.gz
chromium_src-90437dd218ba09f01612ebfc47eda167d67fb368.tar.bz2
Revert of Move net::FormatUrl and friends outside of //net and into //components (patchset #16 id:290001 of https://codereview.chromium.org/1171333003/ )
Reason for revert: breaks gn_check on Android: https://build.chromium.org/p/chromium.linux/builders/Android%20GN/builds/28796/steps/gn_check/logs/stdio Original issue's description: > Move net::FormatUrl and friends outside of //net and into //components > > net::FormatUrl and related are specifically concerned with display > policies of URLs, which is not something that //net needs to be aware > of, as that's a UX question. > > This folds in net::FormatURL along with the existing //components/url_fixer > and //components/secure_display into a common component, > //components/url_formatter, that handles reformatting URLs for user-friendly > or data storage (url_formatter), for use in security prompts (elide_url), > or for reformatting URLs from user input (url_fixer) > > (Disabling presubmit since this is intentionally not fixing a legacy API, just moving it for future cleanups) > > BUG=486979 > NOPRESUBMIT=true > > Committed: https://crrev.com/1659865c3eb47166c82378bb840801135b057a09 > Cr-Commit-Position: refs/heads/master@{#341605} TBR=droger@chromium.org,jam@chromium.org,mkwst@chromium.org,pkasting@chromium.org,sky@chromium.org,stuartmorgan@chromium.org,felt@chromium.org,rsleevi@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=486979 Review URL: https://codereview.chromium.org/1260033005 Cr-Commit-Position: refs/heads/master@{#341691}
Diffstat (limited to 'chrome/browser/android')
-rw-r--r--chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc5
-rw-r--r--chrome/browser/android/omnibox/autocomplete_controller_android.cc7
-rw-r--r--chrome/browser/android/tab_android.cc4
-rw-r--r--chrome/browser/android/url_utilities.cc4
4 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc
index 04d0ab3..73178ff 100644
--- a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc
+++ b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc
@@ -13,10 +13,10 @@
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar.h"
-#include "components/url_formatter/url_formatter.h"
#include "grit/components_strings.h"
#include "grit/theme_resources.h"
#include "jni/FullscreenInfoBarDelegate_jni.h"
+#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
@@ -69,8 +69,7 @@ base::string16 FullscreenInfoBarDelegate::GetMessageText() const {
std::string language =
profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
return l10n_util::GetStringFUTF16(
- IDS_FULLSCREEN_INFOBAR_TEXT,
- url_formatter::FormatUrl(GURL(origin_), language));
+ IDS_FULLSCREEN_INFOBAR_TEXT, net::FormatUrl(GURL(origin_), language));
}
base::string16 FullscreenInfoBarDelegate::GetButtonLabel(
diff --git a/chrome/browser/android/omnibox/autocomplete_controller_android.cc b/chrome/browser/android/omnibox/autocomplete_controller_android.cc
index 2e84fc9..098eaca 100644
--- a/chrome/browser/android/omnibox/autocomplete_controller_android.cc
+++ b/chrome/browser/android/omnibox/autocomplete_controller_android.cc
@@ -42,7 +42,6 @@
#include "components/search/search.h"
#include "components/search_engines/template_url_service.h"
#include "components/toolbar/toolbar_model.h"
-#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
@@ -50,6 +49,7 @@
#include "content/public/common/url_constants.h"
#include "jni/AutocompleteController_jni.h"
#include "net/base/escape.h"
+#include "net/base/net_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
using base::android::AttachCurrentThread;
@@ -475,9 +475,8 @@ base::string16 AutocompleteControllerAndroid::FormatURLUsingAcceptLanguages(
std::string languages(
profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
- return url_formatter::FormatUrl(
- url, languages, url_formatter::kFormatUrlOmitAll,
- net::UnescapeRule::SPACES, nullptr, nullptr, nullptr);
+ return net::FormatUrl(url, languages, net::kFormatUrlOmitAll,
+ net::UnescapeRule::SPACES, NULL, NULL, NULL);
}
ScopedJavaLocalRef<jobject>
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 2e1aaa5..84184b7 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -56,7 +56,7 @@
#include "components/infobars/core/infobar_container.h"
#include "components/navigation_interception/intercept_navigation_delegate.h"
#include "components/navigation_interception/navigation_params.h"
-#include "components/url_formatter/url_fixer.h"
+#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/browser_thread.h"
@@ -570,7 +570,7 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(JNIEnv* env,
}
GURL fixed_url(
- url_formatter::FixupURL(gurl.possibly_invalid_spec(), std::string()));
+ url_fixer::FixupURL(gurl.possibly_invalid_spec(), std::string()));
if (!fixed_url.is_valid())
return PAGE_LOAD_FAILED;
diff --git a/chrome/browser/android/url_utilities.cc b/chrome/browser/android/url_utilities.cc
index e9224f4..495a0cd 100644
--- a/chrome/browser/android/url_utilities.cc
+++ b/chrome/browser/android/url_utilities.cc
@@ -5,7 +5,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "components/google/core/browser/google_util.h"
-#include "components/url_formatter/url_fixer.h"
+#include "components/url_fixer/url_fixer.h"
#include "jni/UrlUtilities_jni.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "url/gurl.h"
@@ -80,7 +80,7 @@ static jstring FixupUrl(JNIEnv* env,
jstring url,
jstring optional_desired_tld) {
DCHECK(url);
- GURL fixed_url = url_formatter::FixupURL(
+ GURL fixed_url = url_fixer::FixupURL(
base::android::ConvertJavaStringToUTF8(env, url),
optional_desired_tld
? base::android::ConvertJavaStringToUTF8(env, optional_desired_tld)