OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ | 5 #ifndef COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ |
6 #define COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ | 6 #define COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 namespace handoff { | 10 namespace handoff { |
(...skipping 17 matching lines...) Expand all Loading... |
28 enum Origin { | 28 enum Origin { |
29 ORIGIN_UNKNOWN = 0, | 29 ORIGIN_UNKNOWN = 0, |
30 ORIGIN_IOS = 1, | 30 ORIGIN_IOS = 1, |
31 ORIGIN_MAC = 2, | 31 ORIGIN_MAC = 2, |
32 ORIGIN_COUNT | 32 ORIGIN_COUNT |
33 }; | 33 }; |
34 | 34 |
35 // Returns ORIGIN_UNKNOWN if |string| is nil or unrecognized. | 35 // Returns ORIGIN_UNKNOWN if |string| is nil or unrecognized. |
36 Origin OriginFromString(NSString* string); | 36 Origin OriginFromString(NSString* string); |
37 | 37 |
| 38 // Returns nil if |origin| is not ORIGIN_IOS or ORIGIN_MAC. |
| 39 NSString* StringFromOrigin(Origin origin); |
| 40 |
38 } // namespace handoff | 41 } // namespace handoff |
39 | 42 |
40 #endif // COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ | 43 #endif // COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_ |
OLD | NEW |