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

Unified Diff: ios/chrome/browser/ui/activity_services/activity_type_util.h

Issue 2586993002: Upstream Chrome on iOS source code [3/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/activity_services/activity_type_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/activity_services/activity_type_util.h
diff --git a/ios/chrome/browser/ui/activity_services/activity_type_util.h b/ios/chrome/browser/ui/activity_services/activity_type_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..73b48548780091f0c24017ff10b5e12429a22d93
--- /dev/null
+++ b/ios/chrome/browser/ui/activity_services/activity_type_util.h
@@ -0,0 +1,70 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_
+#define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_
+
+#import <UIKit/UIKit.h>
+
+namespace activity_type_util {
+
+enum ActivityType {
+ NATIVE_FACEBOOK,
+ NATIVE_MAIL,
+ NATIVE_MESSAGE,
+ NATIVE_TWITTER,
+ NATIVE_WEIBO,
+ NATIVE_CLIPBOARD,
+ PRINT,
+ GOOGLE_DRIVE,
+ GOOGLE_GMAIL,
+ GOOGLE_GOOGLEPLUS,
+ GOOGLE_HANGOUTS,
+ GOOGLE_INBOX,
+ GOOGLE_UNKNOWN,
+ THIRD_PARTY_MAILBOX,
+ THIRD_PARTY_FACEBOOK_MESSENGER,
+ THIRD_PARTY_WHATS_APP,
+ THIRD_PARTY_LINE,
+ THIRD_PARTY_VIBER,
+ THIRD_PARTY_SKYPE,
+ THIRD_PARTY_TANGO,
+ THIRD_PARTY_WECHAT,
+ THIRD_PARTY_EVERNOTE,
+ THIRD_PARTY_PINTEREST,
+ THIRD_PARTY_POCKET,
+ THIRD_PARTY_READABILITY,
+ THIRD_PARTY_INSTAPAPER,
+ APPEX_PASSWORD_MANAGEMENT_1PASSWORD,
+ APPEX_PASSWORD_MANAGEMENT_LASTPASS,
+ APPEX_PASSWORD_MANAGEMENT_DASHLANE,
+ APPEX_PASSWORD_MANAGEMENT_OTHERS,
+ // UNKNOWN must be the last type.
+ UNKNOWN,
+};
+
+// Returns the ActivityType associated with |activityString|.
+ActivityType TypeFromString(NSString* activityString);
+
+// Returns the version number to use for Password Management App Extensions
+// for the activity indicated by |activityString|. This string is the
+// identification for the App Extension. Returned value is an autoreleased
+// object or nil if |activityString| does not belong to a Password
+// Management App Extension.
+NSNumber* PasswordAppExActivityVersion(NSString* activityString);
+
+// Whether activity indicated in |activityString| is an iOS Password Management
+// App Extension.
+bool IsPasswordAppExActivity(NSString* activityString);
+
+// Returns the message to present when the activity |type| successfully
+// occurred. Returns nil if no message should be presented.
+NSString* SuccessMessageForActivity(ActivityType type);
+
+// Records the UMA for activity |type|.
+void RecordMetricForActivity(ActivityType type);
+
+} // namespace activity_type_util
+
+#endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_ACTIVITY_TYPE_UTIL_H_
« no previous file with comments | « no previous file | ios/chrome/browser/ui/activity_services/activity_type_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698