summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 19:51:04 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 19:51:04 +0000
commit47041caea97f2ffe6ecd5963684d3b57f7dde14d (patch)
tree44810ab8d39567268f74eaf8d6f6fc63e2410d67
parentb068e3357250547bee1fd3075d05e5f44f8bfafb (diff)
downloadchromium_src-47041caea97f2ffe6ecd5963684d3b57f7dde14d.zip
chromium_src-47041caea97f2ffe6ecd5963684d3b57f7dde14d.tar.gz
chromium_src-47041caea97f2ffe6ecd5963684d3b57f7dde14d.tar.bz2
Change some calls to gfx::ElideUrl() to using gfx::GetCleanStringFromUrl()
Review URL: http://codereview.chromium.org/27148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10363 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc6
-rw-r--r--chrome/browser/autocomplete/autocomplete.h6
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc7
-rw-r--r--chrome/browser/autocomplete/history_url_provider.h2
4 files changed, 11 insertions, 10 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 631aebd..9f455c8 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -430,11 +430,11 @@ std::wstring AutocompleteProvider::StringForURLDisplay(
const GURL& url,
bool check_accept_lang) {
#if !defined(OS_MACOSX)
- return gfx::ElideUrl(url, ChromeFont(), 0, check_accept_lang && profile_ ?
+ return gfx::GetCleanStringFromUrl(url, check_accept_lang && profile_ ?
profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) :
- std::wstring());
+ std::wstring(), NULL, NULL);
#else
- // TODO(port): need gfx::ElideUrl and ChromeFont
+ // TODO(port): need gfx::GetCleanStringFromUrl
NOTIMPLEMENTED();
return UTF8ToWide(url.spec());
#endif
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index 79095ad..d047b62 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -513,9 +513,9 @@ class AutocompleteProvider
// The name of this provider. Used for logging.
const char* name_;
- // A convenience function to call gfx::ElideUrl() with the current set of
- // "Accept Languages" when check_accept_lang is true. Otherwise, it's called
- // with an empty list.
+ // A convenience function to call gfx::GetCleanStringFromUrl() with the
+ // current set of "Accept Languages" when check_accept_lang is true.
+ // Otherwise, it's called with an empty list.
std::wstring StringForURLDisplay(const GURL& url, bool check_accept_lang);
private:
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 783af00..97ccd03 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -802,10 +802,11 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
!!info.visit_count(), AutocompleteMatch::HISTORY_URL);
match.destination_url = info.url();
#if !defined(OS_MACOSX)
- match.fill_into_edit = gfx::ElideUrl(info.url(), ChromeFont(), 0,
- match_type == WHAT_YOU_TYPED ? std::wstring() : params->languages);
+ match.fill_into_edit = gfx::GetCleanStringFromUrl(info.url(),
+ match_type == WHAT_YOU_TYPED ? std::wstring() : params->languages,
+ NULL, NULL);
#else
- // TODO(port): ChromeFont() and gfx::ElideUrl not implemented on mac.
+ // TODO(port): GetCleanStringFromUrl() not implemented on mac.
NOTIMPLEMENTED();
#endif
if (!params->input.prevent_inline_autocomplete()) {
diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h
index dfb462d..92ee730 100644
--- a/chrome/browser/autocomplete/history_url_provider.h
+++ b/chrome/browser/autocomplete/history_url_provider.h
@@ -112,7 +112,7 @@ struct HistoryURLProviderParams {
// to matches_ on the main thread in QueryComplete().
ACMatches matches;
- // Languages we should pass to gfx::ElideUrl.
+ // Languages we should pass to gfx::GetCleanStringFromUrl.
std::wstring languages;
private: