summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 05:29:27 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-04 05:29:27 +0000
commit4c4d8d2b8aa8ae394d0f933700ddd9e682b141af (patch)
tree6e3e10e71c29bb9cc8d221d4de38d9dc603e32cd /chrome/browser/browser.cc
parent39d74d8b3c05faf98935927b68eaebb9a23a76a4 (diff)
downloadchromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.zip
chromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.tar.gz
chromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.tar.bz2
Convert NavigationEntry title to string16. TabContents::GetTitle no longer needs
to be virtual, either. This also changes how the display URL is computed. Instead of doing it preemptively, we now do so lazily. This allows us to do the URL formatting correctly using the elider so that we can do IDN and unescaping. I changed string_util's singleton functions. I was worried that other code might make a singleton of string, which would give you this same value as a non-const string. This would mean our empty strings might no longer be empty. Review URL: http://codereview.chromium.org/39022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 3b3851e..36aa430 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -398,7 +398,7 @@ std::wstring Browser::GetCurrentPageTitle() const {
// |contents| can be NULL because GetCurrentPageTitle is called by the window
// during the window's creation (before tabs have been added).
if (contents) {
- title = contents->GetTitle();
+ title = UTF16ToWideHack(contents->GetTitle());
FormatTitleForDisplay(&title);
}
if (title.empty())
@@ -738,7 +738,7 @@ void Browser::BookmarkCurrentPage() {
return;
bool was_bookmarked = model->IsBookmarked(url);
- model->SetURLStarred(url, entry->title(), true);
+ model->SetURLStarred(url, UTF16ToWideHack(entry->title()), true);
if (window_->IsActive()) {
// Only show the bubble if the window is active, otherwise we may get into
// weird situations were the bubble is deleted as soon as it is shown.