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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestion_identifier.mm

Issue 2762643003: Move ContentSuggestions identifiers to custom target (Closed)
Patch Set: Address comments 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
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698