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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.mm

Issue 2606293002: Remove ScopedVector from chrome/browser/ui. (Closed)
Patch Set: nits Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h" 5 #import "chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 AccountAvatarFetcher* fetcher = 72 AccountAvatarFetcher* fetcher =
73 new AccountAvatarFetcher(avatarURL, bridge->AsWeakPtr()); 73 new AccountAvatarFetcher(avatarURL, bridge->AsWeakPtr());
74 bridges_.push_back(std::move(bridge)); 74 bridges_.push_back(std::move(bridge));
75 [self startRequestWithFetcher:fetcher]; 75 [self startRequestWithFetcher:fetcher];
76 } 76 }
77 77
78 - (void)updateAvatar:(NSImage*)image 78 - (void)updateAvatar:(NSImage*)image
79 fromBridge:(AccountAvatarFetcherBridge*)bridge 79 fromBridge:(AccountAvatarFetcherBridge*)bridge
80 forView:(CredentialItemButton*)view { 80 forView:(CredentialItemButton*)view {
81 [view setImage:image]; 81 [view setImage:image];
82 auto it = std::find(bridges_.begin(), bridges_.end(), bridge); 82 for (auto it = bridges_.begin(); it != bridges_.end(); it++) {
83 if (it != bridges_.end()) 83 if (it->get() == bridge) {
84 bridges_.erase(it); 84 bridges_.erase(it);
85 return;
86 }
87 }
85 } 88 }
86 89
87 @end 90 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698