summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:15:24 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:15:24 +0000
commitf9fe8630a0ceba09f1bfcc4af7a52048be0d133c (patch)
treec3a75daafa2d78e70e17bf24fb91502e8f94171c /chrome/browser/bookmarks
parent03ce2f5bf335b39ad24306a3a962823e46305cc4 (diff)
downloadchromium_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/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_table_model.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/bookmarks/bookmark_table_model.cc b/chrome/browser/bookmarks/bookmark_table_model.cc
index 458ad0c..85d4032 100644
--- a/chrome/browser/bookmarks/bookmark_table_model.cc
+++ b/chrome/browser/bookmarks/bookmark_table_model.cc
@@ -11,10 +11,14 @@
#include "base/string_util.h"
#include "base/time_format.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
+#include "chrome/browser/profile.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "googleurl/src/gurl.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "net/base/net_util.h"
namespace {
@@ -308,7 +312,11 @@ std::wstring BookmarkTableModel::GetText(int row, int column_id) {
case IDS_BOOKMARK_TABLE_URL: {
if (!node->is_url())
return std::wstring();
- std::wstring url_text = UTF8ToWide(node->GetURL().spec());
+ std::wstring languages = model_ && model_->profile()
+ ? model_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)
+ : std::wstring();
+ std::wstring url_text =
+ net::FormatUrl(node->GetURL(), languages, false, true, NULL, NULL);
if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
l10n_util::WrapStringWithLTRFormatting(&url_text);
return url_text;