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

Unified Diff: chrome/browser/possible_url_model.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 years, 1 month 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
Index: chrome/browser/possible_url_model.cc
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index f4197626ec138ee46a22d12995cc972b88ec36f6..b0f9e0e020f839fac02c159242c88dfdb12dd9b1 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -136,10 +136,9 @@ std::wstring PossibleURLModel::GetText(int row, int col_id) {
// TODO(xji): Consider adding a special case if the title text is a URL,
// since those should always have LTR directionality. Please refer to
// http://crbug.com/6726 for more information.
- std::wstring localized_title;
- if (base::i18n::AdjustStringForLocaleDirection(title, &localized_title))
- return localized_title;
- return title;
+ std::wstring localized_title = title;
Avi (use Gerrit) 2010/11/23 16:07:08 You're making a copy anyway; clearer to just make
+ base::i18n::AdjustStringForLocaleDirection(&localized_title);
+ return localized_title;
}
// TODO(brettw): this should probably pass the GURL up so the URL elider

Powered by Google App Engine
This is Rietveld 408576698