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 #import "ios/chrome/browser/ui/activity_services/activity_type_util.h" | 5 #import "ios/chrome/browser/ui/activity_services/activity_type_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/user_metrics.h" | 8 #include "base/metrics/user_metrics.h" |
9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 const char* bundle_id; | 35 const char* bundle_id; |
36 bool exact_match; | 36 bool exact_match; |
37 } kAllPasswordManagerApps[] = { | 37 } kAllPasswordManagerApps[] = { |
38 // 1Password | 38 // 1Password |
39 {"com.agilebits.onepassword-ios.extension", true}, | 39 {"com.agilebits.onepassword-ios.extension", true}, |
40 // LastPass | 40 // LastPass |
41 {"com.lastpass.ilastpass.LastPassExt", true}, | 41 {"com.lastpass.ilastpass.LastPassExt", true}, |
42 // Dashlane | 42 // Dashlane |
43 {"com.dashlane.dashlanephonefinal.", false}, | 43 {"com.dashlane.dashlanephonefinal.", false}, |
44 // Enpass | 44 // Enpass |
45 {"in.sinew.Walletx.WalletxExt", true}}; | 45 {"in.sinew.Walletx.WalletxExt", true}, |
| 46 // Secrets touch |
| 47 {"com.outercorner.ios.Secrets.Search", true}}; |
46 | 48 |
47 std::string activity = base::SysNSStringToUTF8(activity_string); | 49 std::string activity = base::SysNSStringToUTF8(activity_string); |
48 for (const auto& app : kAllPasswordManagerApps) { | 50 for (const auto& app : kAllPasswordManagerApps) { |
49 std::string bundle_id(app.bundle_id); | 51 std::string bundle_id(app.bundle_id); |
50 if (app.exact_match) { | 52 if (app.exact_match) { |
51 if (activity == bundle_id) | 53 if (activity == bundle_id) |
52 return true; | 54 return true; |
53 } else { | 55 } else { |
54 if (activity.find(bundle_id) == 0) | 56 if (activity.find(bundle_id) == 0) |
55 return true; | 57 return true; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 base::UserMetricsAction("MobileShareMenuToContentApp")); | 212 base::UserMetricsAction("MobileShareMenuToContentApp")); |
211 break; | 213 break; |
212 case APPEX_PASSWORD_MANAGEMENT: | 214 case APPEX_PASSWORD_MANAGEMENT: |
213 base::RecordAction( | 215 base::RecordAction( |
214 base::UserMetricsAction("MobileAppExFormFilledByPasswordManager")); | 216 base::UserMetricsAction("MobileAppExFormFilledByPasswordManager")); |
215 break; | 217 break; |
216 } | 218 } |
217 } | 219 } |
218 | 220 |
219 } // activity_type_util | 221 } // activity_type_util |
OLD | NEW |