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

Side by Side Diff: remoting/client/ios/domain/user_info.mm

Issue 2681173002: Adding domain and facade supporting classes for remoting iOS app. (Closed)
Patch Set: Renaming domain objects based on feedback. 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 unified diff | Download patch
« no previous file with comments | « remoting/client/ios/domain/user_info.h ('k') | remoting/client/ios/facade/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support."
7 #endif
8
9 #import "remoting/client/ios/domain/user_info.h"
10
11 @implementation UserInfo
12
13 @synthesize userId = _userId;
14 @synthesize userFullName = _userFullName;
15 @synthesize userEmail = _userEmail;
16
17 // Parse jsonData into Host list.
18 + (UserInfo*)parseListFromJSON:(NSMutableData*)data {
19 NSError* error;
20
21 NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data
22 options:kNilOptions
23 error:&error];
24
25 UserInfo* user = [[UserInfo alloc] init];
26 user.userId = [json objectForKey:@"userId"];
27 user.userFullName = [json objectForKey:@"userFullName"];
28 user.userEmail = [json objectForKey:@"userEmail"];
29
30 return user;
31 }
32
33 - (NSComparisonResult)compare:(UserInfo*)user {
34 return [self.userId compare:user.userId];
35 }
36
37 @end
OLDNEW
« no previous file with comments | « remoting/client/ios/domain/user_info.h ('k') | remoting/client/ios/facade/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698