summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 19:40:15 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 19:40:15 +0000
commite36fd81da9e64f3c373cdf45d195d6d402d4b2c0 (patch)
treeb525db60ee4fabfc4aa3949907bb61593f7f6efd /chrome
parentbe009aa1a67dc0c8745f227d6cd7f271af8f9483 (diff)
downloadchromium_src-e36fd81da9e64f3c373cdf45d195d6d402d4b2c0.zip
chromium_src-e36fd81da9e64f3c373cdf45d195d6d402d4b2c0.tar.gz
chromium_src-e36fd81da9e64f3c373cdf45d195d6d402d4b2c0.tar.bz2
wstring: remove some deprecated functions that are no longer used
BUG=76112 Review URL: http://codereview.chromium.org/6693003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/net/url_fixer_upper.cc60
-rw-r--r--chrome/browser/net/url_fixer_upper.h7
2 files changed, 0 insertions, 67 deletions
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index 07881a4..9111d8a 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -30,49 +30,6 @@ namespace {
// a url string, and these need to be updated when the URL is converted from
// UTF8 to UTF16. Instead of this after-the-fact adjustment, we should parse it
// in the correct string format to begin with.
-url_parse::Component UTF8ComponentToWideComponent(
- const std::string& text_utf8,
- const url_parse::Component& component_utf8) {
- if (component_utf8.len == -1)
- return url_parse::Component();
-
- std::string before_component_string =
- text_utf8.substr(0, component_utf8.begin);
- std::string component_string = text_utf8.substr(component_utf8.begin,
- component_utf8.len);
- std::wstring before_component_string_w = UTF8ToWide(before_component_string);
- std::wstring component_string_w = UTF8ToWide(component_string);
- url_parse::Component component_w(before_component_string_w.length(),
- component_string_w.length());
- return component_w;
-}
-
-void UTF8PartsToWideParts(const std::string& text_utf8,
- const url_parse::Parsed& parts_utf8,
- url_parse::Parsed* parts) {
- if (IsStringASCII(text_utf8)) {
- *parts = parts_utf8;
- return;
- }
-
- parts->scheme =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.scheme);
- parts ->username =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.username);
- parts->password =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.password);
- parts->host =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.host);
- parts->port =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.port);
- parts->path =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.path);
- parts->query =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.query);
- parts->ref =
- UTF8ComponentToWideComponent(text_utf8, parts_utf8.ref);
-}
-#if defined(WCHAR_T_IS_UTF32)
url_parse::Component UTF8ComponentToUTF16Component(
const std::string& text_utf8,
const url_parse::Component& component_utf8) {
@@ -115,7 +72,6 @@ void UTF8PartsToUTF16Parts(const std::string& text_utf8,
parts->ref =
UTF8ComponentToUTF16Component(text_utf8, parts_utf8.ref);
}
-#endif
TrimPositions TrimWhitespaceUTF8(const std::string& input,
TrimPositions positions,
@@ -616,16 +572,6 @@ GURL URLFixerUpper::FixupRelativeFile(const FilePath& base_dir,
return FixupURL(text_utf8, std::string());
}
-// Deprecated functions. To be removed when all callers are updated.
-std::wstring URLFixerUpper::SegmentURL(const std::wstring& text,
- url_parse::Parsed* parts) {
- std::string text_utf8 = WideToUTF8(text);
- url_parse::Parsed parts_utf8;
- std::string scheme_utf8 = SegmentURL(text_utf8, &parts_utf8);
- UTF8PartsToWideParts(text_utf8, parts_utf8, parts);
- return UTF8ToWide(scheme_utf8);
-}
-#if defined(WCHAR_T_IS_UTF32)
string16 URLFixerUpper::SegmentURL(const string16& text,
url_parse::Parsed* parts) {
std::string text_utf8 = UTF16ToUTF8(text);
@@ -634,12 +580,6 @@ string16 URLFixerUpper::SegmentURL(const string16& text,
UTF8PartsToUTF16Parts(text_utf8, parts_utf8, parts);
return UTF8ToUTF16(scheme_utf8);
}
-#endif
-GURL URLFixerUpper::FixupRelativeFile(const std::wstring& base_dir,
- const std::wstring& text) {
- return FixupRelativeFile(FilePath::FromWStringHack(base_dir),
- FilePath::FromWStringHack(text));
-}
void URLFixerUpper::OffsetComponent(int offset, url_parse::Component* part) {
DCHECK(part);
diff --git a/chrome/browser/net/url_fixer_upper.h b/chrome/browser/net/url_fixer_upper.h
index fa5ba1b..e6096bb 100644
--- a/chrome/browser/net/url_fixer_upper.h
+++ b/chrome/browser/net/url_fixer_upper.h
@@ -30,11 +30,7 @@ namespace URLFixerUpper {
// Returns the canonicalized scheme, or the empty string when |text| is only
// whitespace.
std::string SegmentURL(const std::string& text, url_parse::Parsed* parts);
- // Deprecated temporary compatibility functions.
- std::wstring SegmentURL(const std::wstring& text, url_parse::Parsed* parts);
-#if defined(WCHAR_T_IS_UTF32)
string16 SegmentURL(const string16& text, url_parse::Parsed* parts);
-#endif
// Converts |text| to a fixed-up URL and returns it. Attempts to make
// some "smart" adjustments to obviously-invalid input where possible.
@@ -63,9 +59,6 @@ namespace URLFixerUpper {
// should use FixupURL() directly. This function should only be used when
// relative path handling is desired, as for command line processing.
GURL FixupRelativeFile(const FilePath& base_dir, const FilePath& text);
- // Deprecated temporary compatibility function.
- GURL FixupRelativeFile(const std::wstring& base_dir,
- const std::wstring& text);
// Offsets the beginning index of |part| by |offset|, which is allowed to be
// negative. In some cases, the desired component does not exist at the given