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

Unified Diff: chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm

Issue 2606293002: Remove ScopedVector from chrome/browser/ui. (Closed)
Patch Set: view Created 3 years, 12 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/cocoa/passwords/account_avatar_fetcher_manager.mm
diff --git a/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm b/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm
index c8332a61d140d55a6982b9f135707846a945f599..a147b462a623897d571f30c81afa55082bdad609 100644
--- a/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm
+++ b/chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm
@@ -79,7 +79,11 @@ void AccountAvatarFetcherBridge::UpdateAvatar(const gfx::ImageSkia& image) {
fromBridge:(AccountAvatarFetcherBridge*)bridge
forView:(CredentialItemButton*)view {
[view setImage:image];
- auto it = std::find(bridges_.begin(), bridges_.end(), bridge);
+ auto it = std::find_if(
+ bridges_.begin(), bridges_.end(),
+ [bridge](const std::unique_ptr<AccountAvatarFetcherBridge>& ptr) {
+ return ptr.get() == bridge;
+ });
if (it != bridges_.end())
bridges_.erase(it);
Nico 2017/01/03 18:12:35 nit: fwiw I find for (const auto& it = bridges_
Avi (use Gerrit) 2017/01/03 22:54:53 Done.
}

Powered by Google App Engine
This is Rietveld 408576698