diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 18:15:24 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-22 18:15:24 +0000 |
commit | f9fe8630a0ceba09f1bfcc4af7a52048be0d133c (patch) | |
tree | c3a75daafa2d78e70e17bf24fb91502e8f94171c /chrome/browser/autocomplete | |
parent | 03ce2f5bf335b39ad24306a3a962823e46305cc4 (diff) | |
download | chromium_src-f9fe8630a0ceba09f1bfcc4af7a52048be0d133c.zip chromium_src-f9fe8630a0ceba09f1bfcc4af7a52048be0d133c.tar.gz chromium_src-f9fe8630a0ceba09f1bfcc4af7a52048be0d133c.tar.bz2 |
Shows Unicode IDN instead of Punycode in the followings:
- Bookmark Manager
- Edit Bookmark dialog opened by Bookmark Manager
- Edit Bookmark dialog opened by the star on the left of the address bar
Introduces new function, net::FormatUrl(), which has the following
parameters in addition to gfx::GetCleanStringFromUrl().
- bool omit_username_password
- bool unescape
and moves gfx::GetClienStringFromUrl() to net:: namespace, and removed
the last two parameters.
BUG=3991
Checked in for tkent
Original review = http://codereview.chromium.org/115346
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete.cc | 7 | ||||
-rw-r--r-- | chrome/browser/autocomplete/history_url_provider.cc | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index 65f71c4..9720e73 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -6,7 +6,6 @@ #include <algorithm> -#include "app/gfx/text_elider.h" #include "app/l10n_util.h" #include "base/basictypes.h" #include "base/string_util.h" @@ -492,9 +491,9 @@ void AutocompleteProvider::UpdateStarredStateOfMatches() { std::wstring AutocompleteProvider::StringForURLDisplay( const GURL& url, bool check_accept_lang) const { - return gfx::GetCleanStringFromUrl(url, (check_accept_lang && profile_) ? - profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) : std::wstring(), - NULL, NULL); + std::wstring languages = (check_accept_lang && profile_) ? + profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) : std::wstring(); + return net::FormatUrl(url, languages); } // AutocompleteResult --------------------------------------------------------- diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc index 0083bfe..faae195 100644 --- a/chrome/browser/autocomplete/history_url_provider.cc +++ b/chrome/browser/autocomplete/history_url_provider.cc @@ -6,7 +6,6 @@ #include <algorithm> -#include "app/gfx/text_elider.h" #include "base/basictypes.h" #include "base/histogram.h" #include "base/message_loop.h" @@ -832,9 +831,8 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch( !!info.visit_count(), AutocompleteMatch::HISTORY_URL); match.destination_url = info.url(); DCHECK(match.destination_url.is_valid()); - match.fill_into_edit = gfx::GetCleanStringFromUrl(info.url(), - match_type == WHAT_YOU_TYPED ? std::wstring() : params->languages, - NULL, NULL); + match.fill_into_edit = net::FormatUrl(info.url(), + match_type == WHAT_YOU_TYPED ? std::wstring() : params->languages); if (!params->input.prevent_inline_autocomplete()) { match.inline_autocomplete_offset = history_match.input_location + params->input.text().length(); |