summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui
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/ui/webui
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/ui/webui')
-rw-r--r--chrome/browser/ui/webui/history_ui.cc5
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options/core_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/startup_pages_handler.cc6
4 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 69de94b..0fd41b3 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -46,13 +46,13 @@
#include "components/search/search.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/sync_driver/device_info.h"
-#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "grit/browser_resources.h"
#include "grit/theme_resources.h"
#include "net/base/escape.h"
+#include "net/base/net_util.h"
#include "sync/protocol/history_delete_directive_specifics.pb.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
@@ -352,8 +352,7 @@ scoped_ptr<base::DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue(
scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
SetUrlAndTitle(result.get());
- base::string16 domain =
- url_formatter::IDNToUnicode(url.host(), accept_languages);
+ base::string16 domain = net::IDNToUnicode(url.host(), accept_languages);
// When the domain is empty, use the scheme instead. This allows for a
// sensible treatment of e.g. file: URLs when group by domain is on.
if (domain.empty())
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 8a60bf2..a1b971a 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -48,7 +48,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
#include "components/onc/onc_constants.h"
-#include "components/url_formatter/url_fixer.h"
+#include "components/url_fixer/url_fixer.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc
index 77a4acd..9682bb95 100644
--- a/chrome/browser/ui/webui/options/core_options_handler.cc
+++ b/chrome/browser/ui/webui/options/core_options_handler.cc
@@ -23,7 +23,7 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/locale_settings.h"
-#include "components/url_formatter/url_fixer.h"
+#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/user_metrics.h"
@@ -575,7 +575,7 @@ void CoreOptionsHandler::HandleSetPref(const base::ListValue* args,
NOTREACHED();
return;
}
- GURL fixed = url_formatter::FixupURL(original, std::string());
+ GURL fixed = url_fixer::FixupURL(original, std::string());
temp_value.reset(new base::StringValue(fixed.spec()));
value = temp_value.get();
break;
diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.cc b/chrome/browser/ui/webui/options/startup_pages_handler.cc
index 6f9946c..c8ebc9a 100644
--- a/chrome/browser/ui/webui/options/startup_pages_handler.cc
+++ b/chrome/browser/ui/webui/options/startup_pages_handler.cc
@@ -21,7 +21,7 @@
#include "components/omnibox/browser/autocomplete_controller.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_result.h"
-#include "components/url_formatter/url_fixer.h"
+#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/web_ui.h"
@@ -163,7 +163,7 @@ void StartupPagesHandler::AddStartupPage(const base::ListValue* args) {
std::string url_string;
CHECK(args->GetString(0, &url_string));
- GURL url = url_formatter::FixupURL(url_string, std::string());
+ GURL url = url_fixer::FixupURL(url_string, std::string());
if (!url.is_valid())
return;
@@ -188,7 +188,7 @@ void StartupPagesHandler::EditStartupPage(const base::ListValue* args) {
return;
}
- fixed_url = url_formatter::FixupURL(url_string, std::string());
+ fixed_url = url_fixer::FixupURL(url_string, std::string());
if (!fixed_url.is_empty()) {
std::vector<GURL> urls = startup_custom_pages_table_model_->GetURLs();
urls[index] = fixed_url;