Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Unified Diff: chrome/browser/tab_contents/navigation_controller.cc

Issue 39022: Convert NavigationEntry title to string16. TabContents::GetTitle no longer ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.h ('k') | chrome/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/navigation_controller.cc
===================================================================
--- chrome/browser/tab_contents/navigation_controller.cc (revision 10809)
+++ chrome/browser/tab_contents/navigation_controller.cc (working copy)
@@ -475,12 +475,12 @@
NavigationEntry* entry = new NavigationEntry(type, NULL, -1, real_url,
referrer,
- std::wstring(), transition);
+ string16(), transition);
entry->set_display_url(url);
entry->set_user_typed_url(url);
if (url.SchemeIsFile()) {
- entry->set_title(file_util::GetFilenameFromPath(UTF8ToWide(url.host() +
- url.path())));
+ entry->set_title(WideToUTF16Hack(
+ file_util::GetFilenameFromPath(UTF8ToWide(url.host() + url.path()))));
}
return entry;
}
@@ -513,7 +513,7 @@
const std::wstring& title,
SkBitmap* icon) {
NavigationEntry* entry = CreateNavigationEntry(url, referrer, type);
- entry->set_title(title);
+ entry->set_title(WideToUTF16Hack(title));
if (icon)
entry->favicon().set_bitmap(*icon);
@@ -526,11 +526,11 @@
return load_pending_entry_when_active_;
}
-const std::wstring& NavigationController::GetLazyTitle() const {
+const string16& NavigationController::GetLazyTitle() const {
if (pending_entry_)
- return pending_entry_->GetTitleForDisplay();
+ return pending_entry_->GetTitleForDisplay(this);
else
- return EmptyWString();
+ return EmptyString16();
}
const SkBitmap& NavigationController::GetLazyFavIcon() const {
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.h ('k') | chrome/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698