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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_
6 #define COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_
8 #import <Foundation/Foundation.h>
12 // The activity type that Chrome uses to pass a Handoff to itself.
13 extern NSString
* const kChromeHandoffActivityType
;
15 // The value of this key in the userInfo dictionary of an NSUserActivity
16 // indicates the origin. The value should not be used for any privacy or
17 // security sensitive operations, since any application can set the key/value
19 extern NSString
* const kOriginKey
;
21 // This value indicates that an NSUserActivity originated from Chrome on iOS.
22 extern NSString
* const kOriginiOS
;
24 // This value indicates that an NSUserActivity originated from Chrome on Mac.
25 extern NSString
* const kOriginMac
;
27 // Used for UMA metrics.
35 // Returns ORIGIN_UNKNOWN if |string| is nil or unrecognized.
36 Origin
OriginFromString(NSString
* string
);
38 // Returns nil if |origin| is not ORIGIN_IOS or ORIGIN_MAC.
39 NSString
* StringFromOrigin(Origin origin
);
41 } // namespace handoff
43 #endif // COMPONENTS_HANDOFF_HANDOFF_UTILITY_H_