| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion_identifier
.h" |
| 6 |
| 7 #include "base/mac/foundation_util.h" |
| 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
| 13 @implementation ContentSuggestionIdentifier |
| 14 |
| 15 @synthesize sectionInfo = _sectionInfo; |
| 16 @synthesize IDInSection = _IDInSection; |
| 17 |
| 18 #pragma mark - NSObject |
| 19 |
| 20 - (BOOL)isEqual:(id)object { |
| 21 if (self == object) { |
| 22 return YES; |
| 23 } |
| 24 |
| 25 if (![object isKindOfClass:[ContentSuggestionIdentifier class]]) { |
| 26 return NO; |
| 27 } |
| 28 |
| 29 ContentSuggestionIdentifier* other = |
| 30 base::mac::ObjCCastStrict<ContentSuggestionIdentifier>(object); |
| 31 |
| 32 return self.sectionInfo == other.sectionInfo && |
| 33 self.IDInSection == other.IDInSection; |
| 34 } |
| 35 |
| 36 @end |
| OLD | NEW |