| OLD | NEW |
| 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" |
| 11 #include "components/ntp_snippets/category.h" | 11 #include "components/ntp_snippets/category.h" |
| 12 #include "components/ntp_snippets/content_suggestion.h" | 12 #include "components/ntp_snippets/content_suggestion.h" |
| 13 #import "ios/chrome/browser/content_suggestions/content_suggestions_category_wra
pper.h" | 13 #import "ios/chrome/browser/content_suggestions/content_suggestions_category_wra
pper.h" |
| 14 #import "ios/chrome/browser/content_suggestions/content_suggestions_service_brid
ge_observer.h" | 14 #import "ios/chrome/browser/content_suggestions/content_suggestions_service_brid
ge_observer.h" |
| 15 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" | 15 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" |
| 16 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink
.h" | 16 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink
.h" |
| 17 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_item.h" | |
| 18 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_section_i
nformation.h" | 17 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_section_i
nformation.h" |
| 19 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
| 20 | 19 |
| 21 #if !defined(__has_feature) || !__has_feature(objc_arc) | 20 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 22 #error "This file requires ARC support." | 21 #error "This file requires ARC support." |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 namespace { | 24 namespace { |
| 26 | 25 |
| 27 // Returns the Type for this |category|. | 26 // Returns the Type for this |category|. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 self.contentService->GetCategoryInfo(category); | 197 self.contentService->GetCategoryInfo(category); |
| 199 | 198 |
| 200 ContentSuggestionsSectionInformation* sectionInfo = | 199 ContentSuggestionsSectionInformation* sectionInfo = |
| 201 SectionInformationFromCategoryInfo(categoryInfo, category); | 200 SectionInformationFromCategoryInfo(categoryInfo, category); |
| 202 | 201 |
| 203 self.sectionInformationByCategory[[ContentSuggestionsCategoryWrapper | 202 self.sectionInformationByCategory[[ContentSuggestionsCategoryWrapper |
| 204 wrapperWithCategory:category]] = sectionInfo; | 203 wrapperWithCategory:category]] = sectionInfo; |
| 205 } | 204 } |
| 206 | 205 |
| 207 @end | 206 @end |
| OLD | NEW |