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

Unified Diff: ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm

Issue 2617243002: Remove ScopedVector from ios/. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm b/ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm
index b1aacd6ae4b6e08a97a44fc1fc3b283d3104f4fb..d51506ba8413eba015a15d1b7acf46bf03b718f5 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.mm
@@ -4,6 +4,9 @@
#import "ios/chrome/browser/ui/bookmarks/bookmark_all_collection_view.h"
+#include <memory>
+#include <vector>
+
#include "base/logging.h"
#include "base/mac/objc_property_releaser.h"
#include "base/mac/scoped_nsobject.h"
@@ -38,7 +41,7 @@ typedef enum { kNoUpdate = 0, kOneUpdateDone, kUpdateScheduled } UpdateState;
@interface BookmarkAllCollectionView ()<BookmarkPromoCellDelegate> {
// A vector of vectors. Url nodes are segregated by month of creation.
- ScopedVector<NodesSection> _nodesSectionVector;
+ std::vector<std::unique_ptr<NodesSection>> _nodesSectionVector;
// To avoid refreshing the internal model too often.
UpdateState _updateScheduled;
base::mac::ObjCPropertyReleaser _propertyReleaser_BookmarkAllCollectionView;
@@ -177,7 +180,7 @@ typedef enum { kNoUpdate = 0, kOneUpdateDone, kUpdateScheduled } UpdateState;
// Only remove the node from the list of all nodes. Since we also receive a
// 'bookmarkNodeChildrenChanged' callback, the collection view will be updated
// there.
- for (NodesSection* nodesSection : _nodesSectionVector) {
+ for (const auto& nodesSection : _nodesSectionVector) {
NodeVector nodeVector = nodesSection->vector;
// If the node was in _nodesSectionVector, it is now invalid. In that case,
// remove it from _nodesSectionVector.
@@ -292,7 +295,7 @@ typedef enum { kNoUpdate = 0, kOneUpdateDone, kUpdateScheduled } UpdateState;
if ([self shouldShowPromoCell])
section = 1;
- for (NodesSection* nodesSection : _nodesSectionVector) {
+ for (const auto& nodesSection : _nodesSectionVector) {
NodeVector nodeVector = nodesSection->vector;
NSInteger item = 0;
for (const BookmarkNode* node : nodeVector) {

Powered by Google App Engine
This is Rietveld 408576698