| 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 IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ | 6 #define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 namespace activity_type_util { | 10 namespace activity_type_util { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 THIRD_PARTY_LINE, | 29 THIRD_PARTY_LINE, |
| 30 THIRD_PARTY_VIBER, | 30 THIRD_PARTY_VIBER, |
| 31 THIRD_PARTY_SKYPE, | 31 THIRD_PARTY_SKYPE, |
| 32 THIRD_PARTY_TANGO, | 32 THIRD_PARTY_TANGO, |
| 33 THIRD_PARTY_WECHAT, | 33 THIRD_PARTY_WECHAT, |
| 34 THIRD_PARTY_EVERNOTE, | 34 THIRD_PARTY_EVERNOTE, |
| 35 THIRD_PARTY_PINTEREST, | 35 THIRD_PARTY_PINTEREST, |
| 36 THIRD_PARTY_POCKET, | 36 THIRD_PARTY_POCKET, |
| 37 THIRD_PARTY_READABILITY, | 37 THIRD_PARTY_READABILITY, |
| 38 THIRD_PARTY_INSTAPAPER, | 38 THIRD_PARTY_INSTAPAPER, |
| 39 APPEX_PASSWORD_MANAGEMENT_1PASSWORD, | 39 APPEX_PASSWORD_MANAGEMENT, |
| 40 APPEX_PASSWORD_MANAGEMENT_LASTPASS, | |
| 41 APPEX_PASSWORD_MANAGEMENT_DASHLANE, | |
| 42 APPEX_PASSWORD_MANAGEMENT_OTHERS, | |
| 43 // UNKNOWN must be the last type. | 40 // UNKNOWN must be the last type. |
| 44 UNKNOWN, | 41 UNKNOWN, |
| 45 }; | 42 }; |
| 46 | 43 |
| 47 // Returns the ActivityType associated with |activityString|. | 44 // Returns the ActivityType associated with |activityString|. |
| 48 ActivityType TypeFromString(NSString* activityString); | 45 ActivityType TypeFromString(NSString* activityString); |
| 49 | 46 |
| 50 // Returns the version number to use for Password Management App Extensions | 47 // Returns the version number to use for Password Management App Extensions |
| 51 // for the activity indicated by |activityString|. This string is the | 48 // for the activity indicated by |activityString|. This string is the |
| 52 // identification for the App Extension. Returned value is an autoreleased | 49 // identification for the App Extension. Returned value is an autoreleased |
| 53 // object or nil if |activityString| does not belong to a Password | 50 // object or nil if |activityString| does not belong to a Password |
| 54 // Management App Extension. | 51 // Management App Extension. |
| 55 NSNumber* PasswordAppExActivityVersion(NSString* activityString); | 52 NSNumber* PasswordAppExActivityVersion(NSString* activityString); |
| 56 | 53 |
| 57 // Whether activity indicated in |activityString| is an iOS Password Management | 54 // Whether activity indicated in |activityString| is an iOS Password Management |
| 58 // App Extension. | 55 // App Extension. |
| 59 bool IsPasswordAppExActivity(NSString* activityString); | 56 bool IsPasswordAppExActivity(NSString* activityString); |
| 60 | 57 |
| 61 // Returns the message to present when the activity |type| has completed | 58 // Returns the message to present when the activity |type| has completed |
| 62 // successfully. Returns nil if no message should be presented. | 59 // successfully. Returns nil if no message should be presented. |
| 63 NSString* CompletionMessageForActivity(ActivityType type); | 60 NSString* CompletionMessageForActivity(ActivityType type); |
| 64 | 61 |
| 65 // Records the UMA for activity |type|. | 62 // Records the UMA for activity |type|. |
| 66 void RecordMetricForActivity(ActivityType type); | 63 void RecordMetricForActivity(ActivityType type); |
| 67 | 64 |
| 68 } // namespace activity_type_util | 65 } // namespace activity_type_util |
| 69 | 66 |
| 70 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ | 67 #endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_ |
| OLD | NEW |