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

Unified Diff: ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm

Issue 2691593002: Connect ContentSuggestionsMediator to the ContentService (Closed)
Patch Set: Address comments Created 3 years, 10 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/content_suggestions/content_suggestions_category_wrapper.mm
diff --git a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm b/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm
index cc342d5388e749ed72578d7542a0b71ce8ed872f..22678c869284c3a0dfeb59ff84cc3b0031d03dc1 100644
--- a/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm
+++ b/ios/chrome/browser/content_suggestions/content_suggestions_category_wrapper.mm
@@ -18,6 +18,11 @@
@implementation ContentSuggestionsCategoryWrapper
++ (ContentSuggestionsCategoryWrapper*)wrapperWithCategory:
+ (ntp_snippets::Category)category {
+ return [[ContentSuggestionsCategoryWrapper alloc] initWithCategory:category];
+}
+
@synthesize categoryID = _categoryID;
- (instancetype)initWithCategory:(ntp_snippets::Category)category {
@@ -46,7 +51,7 @@
ContentSuggestionsCategoryWrapper* other =
base::mac::ObjCCastStrict<ContentSuggestionsCategoryWrapper>(object);
- return self.category == other.category;
+ return [self category] == [other category];
}
- (NSUInteger)hash {
@@ -57,7 +62,7 @@
- (id)copyWithZone:(nullable NSZone*)zone {
ContentSuggestionsCategoryWrapper* copy =
- [[[self class] allocWithZone:zone] initWithCategory:self.category];
+ [[[self class] allocWithZone:zone] initWithCategory:[self category]];
return copy;
}

Powered by Google App Engine
This is Rietveld 408576698