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

Side by Side Diff: ios/chrome/browser/ui/history/history_service_facade.mm

Issue 2906953003: Remove ScopedVector usage from components/history (Closed)
Patch Set: Remove ScopedVector usage from components/history Created 3 years, 6 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
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browser/ui/history/history_service_facade.h" 5 #import "ios/chrome/browser/ui/history/history_service_facade.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 WEB_HISTORY_QUERY_TIMED_OUT, 268 WEB_HISTORY_QUERY_TIMED_OUT,
269 NUM_WEB_HISTORY_QUERY_BUCKETS); 269 NUM_WEB_HISTORY_QUERY_BUCKETS);
270 } 270 }
271 271
272 void HistoryServiceFacade::QueryComplete(const base::string16& search_text, 272 void HistoryServiceFacade::QueryComplete(const base::string16& search_text,
273 const history::QueryOptions& options, 273 const history::QueryOptions& options,
274 history::QueryResults* results) { 274 history::QueryResults* results) {
275 DCHECK_EQ(0U, query_results_.size()); 275 DCHECK_EQ(0U, query_results_.size());
276 query_results_.reserve(results->size()); 276 query_results_.reserve(results->size());
277 277
278 for (history::URLResult* result : *results) { 278 for (const auto& result : *results) {
279 query_results_.push_back(history::HistoryEntry( 279 query_results_.push_back(history::HistoryEntry(
280 history::HistoryEntry::LOCAL_ENTRY, result->url(), result->title(), 280 history::HistoryEntry::LOCAL_ENTRY, result.url(), result.title(),
281 result->visit_time(), std::string(), !search_text.empty(), 281 result.visit_time(), std::string(), !search_text.empty(),
282 result->snippet().text(), result->blocked_visit())); 282 result.snippet().text(), result.blocked_visit()));
283 } 283 }
284 284
285 results_info_value_.query = search_text; 285 results_info_value_.query = search_text;
286 results_info_value_.finished = results->reached_beginning(); 286 results_info_value_.finished = results->reached_beginning();
287 results_info_value_.query_start_time = 287 results_info_value_.query_start_time =
288 history::GetRelativeDateLocalized((options.begin_time)); 288 history::GetRelativeDateLocalized((options.begin_time));
289 289
290 // Add the specific dates that were searched to display them. 290 // Add the specific dates that were searched to display them.
291 // Should put today if the start is in the future. 291 // Should put today if the start is in the future.
292 if (!options.end_time.is_null()) { 292 if (!options.end_time.is_null()) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 const history::URLRows& deleted_rows, 460 const history::URLRows& deleted_rows,
461 const std::set<GURL>& favicon_urls) { 461 const std::set<GURL>& favicon_urls) {
462 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) { 462 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) {
463 if ([delegate_ 463 if ([delegate_
464 respondsToSelector: 464 respondsToSelector:
465 @selector(historyServiceFacadeDidObserveHistoryDeletion:)]) { 465 @selector(historyServiceFacadeDidObserveHistoryDeletion:)]) {
466 [delegate_ historyServiceFacadeDidObserveHistoryDeletion:this]; 466 [delegate_ historyServiceFacadeDidObserveHistoryDeletion:this];
467 } 467 }
468 } 468 }
469 } 469 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698