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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 2682153002: macOS: Focus first profile (Closed)
Patch Set: Created 3 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 | « 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/profiles/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index 3f34aeeae799094a9010e963cd7dd63a58f5e42a..62b634fecd91984bf3e082ea20ad01bf59b94d7a 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -1594,13 +1594,10 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
showLock = item.signed_in &&
profiles::IsLockAvailable(browser_->profile());
} else {
- NSButton* otherProfileView = [self createOtherProfileView:i];
- if (!firstProfileView_) {
- firstProfileView_ = otherProfileView;
- }
- [otherProfiles addObject:otherProfileView];
+ [otherProfiles addObject:[self createOtherProfileView:i]];
}
}
+ firstProfileView_ = [otherProfiles lastObject];
if (!currentProfileView) // Guest windows don't have an active profile.
currentProfileView = [self createGuestProfileView];
« 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