diff options
author | rsleevi <rsleevi@chromium.org> | 2015-08-07 14:39:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 21:39:50 +0000 |
commit | 24f64dc221628032b7843f1af6b277a7f0d6c562 (patch) | |
tree | ba2c4bb1d37847b2cd76a4d8d243d1f000e0284e /components/content_settings | |
parent | d9773981c8733eb55314efad66398350f862c8be (diff) | |
download | chromium_src-24f64dc221628032b7843f1af6b277a7f0d6c562.zip chromium_src-24f64dc221628032b7843f1af6b277a7f0d6c562.tar.gz chromium_src-24f64dc221628032b7843f1af6b277a7f0d6c562.tar.bz2 |
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
Review URL: https://codereview.chromium.org/1171333003
Cr-Commit-Position: refs/heads/master@{#342445}
Diffstat (limited to 'components/content_settings')
3 files changed, 5 insertions, 3 deletions
diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn index 6db040a..85358c0 100644 --- a/components/content_settings/core/browser/BUILD.gn +++ b/components/content_settings/core/browser/BUILD.gn @@ -48,6 +48,7 @@ static_library("browser") { "//components/content_settings/core/common", "//components/plugins/common", "//components/pref_registry:pref_registry", + "//components/url_formatter", "//net", "//url", ] diff --git a/components/content_settings/core/browser/DEPS b/components/content_settings/core/browser/DEPS index ee92881..106fea2 100644 --- a/components/content_settings/core/browser/DEPS +++ b/components/content_settings/core/browser/DEPS @@ -4,6 +4,7 @@ include_rules = [ "+components/keyed_service/core", "+components/plugins/common", "+components/pref_registry", + "+components/url_formatter", "+net/base", "+net/cookies", ] diff --git a/components/content_settings/core/browser/content_settings_usages_state.cc b/components/content_settings/core/browser/content_settings_usages_state.cc index 89b938c..8113260 100644 --- a/components/content_settings/core/browser/content_settings_usages_state.cc +++ b/components/content_settings/core/browser/content_settings_usages_state.cc @@ -9,7 +9,7 @@ #include "base/prefs/pref_service.h" #include "base/strings/utf_string_conversions.h" #include "components/content_settings/core/browser/host_content_settings_map.h" -#include "net/base/net_util.h" +#include "components/url_formatter/url_formatter.h" ContentSettingsUsagesState::CommittedDetails::CommittedDetails() : current_url_valid(false) { @@ -106,7 +106,7 @@ void ContentSettingsUsagesState::GetDetailedInfo( std::string ContentSettingsUsagesState::GURLToFormattedHost( const GURL& url) const { base::string16 display_host; - net::AppendFormattedHost(url, pref_service_->GetString(accept_language_pref_), - &display_host); + url_formatter::AppendFormattedHost( + url, pref_service_->GetString(accept_language_pref_), &display_host); return base::UTF16ToUTF8(display_host); } |