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

Unified Diff: chrome/browser/ui/cocoa/browser_window_touch_bar.mm

Issue 2928153003: [Mac] Fix the URL on the Fullscreen Touch Bar (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_touch_bar.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_touch_bar.mm b/chrome/browser/ui/cocoa/browser_window_touch_bar.mm
index 2fab43539071b54f9d241fb9d89376d46ce47e93..7d13ad7bb345bf5dd1db2d53bba8d88e93249d5a 100644
--- a/chrome/browser/ui/cocoa/browser_window_touch_bar.mm
+++ b/chrome/browser/ui/cocoa/browser_window_touch_bar.mm
@@ -324,12 +324,12 @@ class HomePrefNotificationBridge {
initWithString:base::SysUTF16ToNSString(displayText)]);
if (originUrl.has_path()) {
- size_t pathLength = originUrl.path().length() - 1;
+ size_t pathIndex = originUrl.GetWithEmptyPath().spec().length();
[attributedString
addAttribute:NSForegroundColorAttributeName
value:OmniboxViewMac::BaseTextColor(true)
- range:NSMakeRange([attributedString length] - pathLength,
- pathLength)];
+ range:NSMakeRange(pathIndex,
+ [attributedString length] - pathIndex)];
}
[touchBarItem
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698