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

Unified Diff: chrome/browser/ui/location_bar/location_bar_util.cc

Issue 381953002: New avatar button: Consolidate text elision between Mac and Win/Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 5 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
Index: chrome/browser/ui/location_bar/location_bar_util.cc
diff --git a/chrome/browser/ui/location_bar/location_bar_util.cc b/chrome/browser/ui/location_bar/location_bar_util.cc
index 23b6b5d6db82ce617575477a0624d269d6b51b4f..7f738b7f09d96da8007712a2f812f408edfe21e9 100644
--- a/chrome/browser/ui/location_bar/location_bar_util.cc
+++ b/chrome/browser/ui/location_bar/location_bar_util.cc
@@ -16,7 +16,8 @@ base::string16 CalculateMinString(const base::string16& description) {
const size_t chop_index = description.find_first_of(
base::kWhitespaceUTF16 + base::ASCIIToUTF16("."));
base::string16 min_string((chop_index == base::string16::npos) ?
- gfx::TruncateString(description, 3) : description.substr(0, chop_index));
+ gfx::TruncateString(description, 3, gfx::WORD_BREAK) :
+ description.substr(0, chop_index));
base::i18n::AdjustStringForLocaleDirection(&min_string);
return min_string;
}

Powered by Google App Engine
This is Rietveld 408576698