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

Side by Side Diff: ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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 "ios/chrome/app/spotlight/bookmarks_spotlight_manager.h" 5 #import "ios/chrome/app/spotlight/bookmarks_spotlight_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #import <CoreSpotlight/CoreSpotlight.h> 9 #import <CoreSpotlight/CoreSpotlight.h>
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 [self refreshNodeInIndex:node->GetChild(child) initial:initial]; 282 [self refreshNodeInIndex:node->GetChild(child) initial:initial];
283 } 283 }
284 } 284 }
285 285
286 - (NSArray*)spotlightItemsWithURL:(const GURL&)URL 286 - (NSArray*)spotlightItemsWithURL:(const GURL&)URL
287 favicon:(UIImage*)favicon 287 favicon:(UIImage*)favicon
288 defaultTitle:(NSString*)defaultTitle { 288 defaultTitle:(NSString*)defaultTitle {
289 NSMutableDictionary* spotlightItems = [[NSMutableDictionary alloc] init]; 289 NSMutableDictionary* spotlightItems = [[NSMutableDictionary alloc] init];
290 std::vector<const bookmarks::BookmarkNode*> nodes; 290 std::vector<const bookmarks::BookmarkNode*> nodes;
291 _bookmarkModel->GetNodesByURL(URL, &nodes); 291 _bookmarkModel->GetNodesByURL(URL, &nodes);
292 for (auto node : nodes) { 292 for (auto* node : nodes) {
293 NSString* nodeTitle = base::SysUTF16ToNSString(node->GetTitle()); 293 NSString* nodeTitle = base::SysUTF16ToNSString(node->GetTitle());
294 NSString* spotlightID = [self spotlightIDForURL:URL title:nodeTitle]; 294 NSString* spotlightID = [self spotlightIDForURL:URL title:nodeTitle];
295 CSSearchableItem* item = [spotlightItems objectForKey:spotlightID]; 295 CSSearchableItem* item = [spotlightItems objectForKey:spotlightID];
296 if (!item) { 296 if (!item) {
297 item = [[super spotlightItemsWithURL:URL 297 item = [[super spotlightItemsWithURL:URL
298 favicon:favicon 298 favicon:favicon
299 defaultTitle:nodeTitle] objectAtIndex:0]; 299 defaultTitle:nodeTitle] objectAtIndex:0];
300 } 300 }
301 NSMutableArray* nodeKeywords = [[NSMutableArray alloc] init]; 301 NSMutableArray* nodeKeywords = [[NSMutableArray alloc] init];
302 [self getParentKeywordsForNode:node inArray:nodeKeywords]; 302 [self getParentKeywordsForNode:node inArray:nodeKeywords];
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 spotlight::kCurrentSpotlightIndexVersion] 337 spotlight::kCurrentSpotlightIndexVersion]
338 forKey:@(spotlight::kSpotlightLastIndexingVersionKey)]; 338 forKey:@(spotlight::kSpotlightLastIndexingVersionKey)];
339 [_delegate bookmarkUpdated]; 339 [_delegate bookmarkUpdated];
340 }); 340 });
341 } 341 }
342 }; 342 };
343 [self clearAllSpotlightItems:completion]; 343 [self clearAllSpotlightItems:completion];
344 } 344 }
345 345
346 @end 346 @end
OLDNEW
« no previous file with comments | « device/vr/vr_display_impl_unittest.cc ('k') | ios/chrome/browser/payments/payment_method_selection_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698