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

Side by Side Diff: ios/chrome/browser/ui/activity_services/activity_type_util.mm

Issue 2820113002: Adds Enpass Password Manager to kAllPasswordManagerApps (Closed)
Patch Set: rebase Created 3 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 bool IsPasswordManagerActivity(NSString* activity_string) { 33 bool IsPasswordManagerActivity(NSString* activity_string) {
34 static struct { 34 static struct {
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
45 {"in.sinew.Walletx.WalletxExt", true}};
44 46
45 std::string activity = base::SysNSStringToUTF8(activity_string); 47 std::string activity = base::SysNSStringToUTF8(activity_string);
46 for (const auto& app : kAllPasswordManagerApps) { 48 for (const auto& app : kAllPasswordManagerApps) {
47 std::string bundle_id(app.bundle_id); 49 std::string bundle_id(app.bundle_id);
48 if (app.exact_match) { 50 if (app.exact_match) {
49 if (activity == bundle_id) 51 if (activity == bundle_id)
50 return true; 52 return true;
51 } else { 53 } else {
52 if (activity.find(bundle_id) == 0) 54 if (activity.find(bundle_id) == 0)
53 return true; 55 return true;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 base::UserMetricsAction("MobileShareMenuToContentApp")); 210 base::UserMetricsAction("MobileShareMenuToContentApp"));
209 break; 211 break;
210 case APPEX_PASSWORD_MANAGEMENT: 212 case APPEX_PASSWORD_MANAGEMENT:
211 base::RecordAction( 213 base::RecordAction(
212 base::UserMetricsAction("MobileAppExFormFilledByPasswordManager")); 214 base::UserMetricsAction("MobileAppExFormFilledByPasswordManager"));
213 break; 215 break;
214 } 216 }
215 } 217 }
216 218
217 } // activity_type_util 219 } // activity_type_util
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698