OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
7 #endif | 7 #endif |
8 | 8 |
9 #import "remoting/client/ios/domain/host_info.h" | 9 #import "remoting/client/ios/domain/host_info.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 - (NSComparisonResult)compare:(HostInfo*)host { | 68 - (NSComparisonResult)compare:(HostInfo*)host { |
69 if (self.isOnline != host.isOnline) { | 69 if (self.isOnline != host.isOnline) { |
70 return self.isOnline ? NSOrderedAscending : NSOrderedDescending; | 70 return self.isOnline ? NSOrderedAscending : NSOrderedDescending; |
71 } else { | 71 } else { |
72 return [self.hostName localizedCaseInsensitiveCompare:host.hostName]; | 72 return [self.hostName localizedCaseInsensitiveCompare:host.hostName]; |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
| 76 - (NSString*)description { |
| 77 return |
| 78 [NSString stringWithFormat:@"HostInfo: name=%@ status=%@ updatedTime= %@", |
| 79 _hostName, _status, _updatedTime]; |
| 80 } |
| 81 |
76 @end | 82 @end |
OLD | NEW |