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

Side by Side Diff: ios/chrome/browser/content_suggestions/content_suggestions_mediator.mm

Issue 2739153002: Reload all ContentSuggestions on notification (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
« no previous file with comments | « no previous file | ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/content_suggestions/content_suggestions_mediator.h" 5 #import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h"
6 6
7 #include "base/mac/bind_objc_block.h" 7 #include "base/mac/bind_objc_block.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 ContentSuggestionIdentifier* suggestionIdentifier = 206 ContentSuggestionIdentifier* suggestionIdentifier =
207 [[ContentSuggestionIdentifier alloc] init]; 207 [[ContentSuggestionIdentifier alloc] init];
208 suggestionIdentifier.IDInSection = suggestion_id.id_within_category(); 208 suggestionIdentifier.IDInSection = suggestion_id.id_within_category();
209 suggestionIdentifier.sectionInfo = self.sectionInformationByCategory[wrapper]; 209 suggestionIdentifier.sectionInfo = self.sectionInformationByCategory[wrapper];
210 210
211 [self.dataSink clearSuggestion:suggestionIdentifier]; 211 [self.dataSink clearSuggestion:suggestionIdentifier];
212 } 212 }
213 213
214 - (void)contentSuggestionsServiceFullRefreshRequired: 214 - (void)contentSuggestionsServiceFullRefreshRequired:
215 (ntp_snippets::ContentSuggestionsService*)suggestionsService { 215 (ntp_snippets::ContentSuggestionsService*)suggestionsService {
216 // Update dataSink. 216 [self.dataSink reloadAllData];
217 } 217 }
218 218
219 - (void)contentSuggestionsServiceShutdown: 219 - (void)contentSuggestionsServiceShutdown:
220 (ntp_snippets::ContentSuggestionsService*)suggestionsService { 220 (ntp_snippets::ContentSuggestionsService*)suggestionsService {
221 // Update dataSink. 221 // Update dataSink.
222 } 222 }
223 223
224 #pragma mark - ContentSuggestionsImageFetcher 224 #pragma mark - ContentSuggestionsImageFetcher
225 225
226 - (void)fetchImageForSuggestion: 226 - (void)fetchImageForSuggestion:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 wrapperWithCategory:category]] = sectionInfo; 262 wrapperWithCategory:category]] = sectionInfo;
263 } 263 }
264 264
265 - (ContentSuggestionsCategoryWrapper*)categoryWrapperForSectionInfo: 265 - (ContentSuggestionsCategoryWrapper*)categoryWrapperForSectionInfo:
266 (ContentSuggestionsSectionInformation*)sectionInfo { 266 (ContentSuggestionsSectionInformation*)sectionInfo {
267 return [[self.sectionInformationByCategory allKeysForObject:sectionInfo] 267 return [[self.sectionInformationByCategory allKeysForObject:sectionInfo]
268 firstObject]; 268 firstObject];
269 } 269 }
270 270
271 @end 271 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698