2
0

Remove MPCheckpoints, no longer useful. Perform pasteboard importing on a background thread.

This commit is contained in:
Maarten Billemont 2014-10-22 23:00:20 -04:00
parent fc21bd959f
commit 9d809f34d9
6 changed files with 35 additions and 99 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 3c7b13b3649c92f7d30e4b8bd0570c8c6b1798c6 Subproject commit a0e80c2dfc96e95b3afbfc0d58a5ba1ff6fbf6c3

View File

@ -122,10 +122,8 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
// No more methods left, fail if key still not known. // No more methods left, fail if key still not known.
if (!tryKey) { if (!tryKey) {
if (password) { if (password)
inf( @"Login failed for: %@", user.userID ); inf( @"Login failed for: %@", user.userID );
MPCheckpoint( MPCheckpointSignInFailed, nil );
}
return NO; return NO;
} }
@ -159,7 +157,6 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
}]; }];
[[NSNotificationCenter defaultCenter] postNotificationName:MPSignedInNotification object:self]; [[NSNotificationCenter defaultCenter] postNotificationName:MPSignedInNotification object:self];
MPCheckpoint( MPCheckpointSignedIn, nil );
return YES; return YES;
} }

View File

@ -745,7 +745,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
return MPImportResultInternalError; return MPImportResultInternalError;
inf( @"Import completed successfully." ); inf( @"Import completed successfully." );
MPCheckpoint( MPCheckpointSitesImported, nil );
[[NSNotificationCenter defaultCenter] postNotificationName:MPSitesImportedNotification object:nil userInfo:@{ [[NSNotificationCenter defaultCenter] postNotificationName:MPSitesImportedNotification object:nil userInfo:@{
MPSitesImportedNotificationUserKey : user MPSitesImportedNotificationUserKey : user
@ -813,10 +812,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
[(loginName?: @"") UTF8String], [siteName UTF8String], content?: @""]; [(loginName?: @"") UTF8String], [siteName UTF8String], content?: @""];
} }
MPCheckpoint( MPCheckpointSitesExported, @{
@"showPasswords" : @(revealPasswords)
} );
return export; return export;
} }

View File

@ -47,35 +47,6 @@ typedef NS_ENUM(NSUInteger, MPSiteType) {
#define MPErrorDomain @"MPErrorDomain" #define MPErrorDomain @"MPErrorDomain"
#define MPCheckpointHelpChapter @"MPCheckpointHelpChapter"
#define MPCheckpointCopyToPasteboard @"MPCheckpointCopyToPasteboard"
#define MPCheckpointCopyLoginNameToPasteboard @"MPCheckpointCopyLoginNameToPasteboard"
#define MPCheckpointResetPasswordCounter @"MPCheckpointResetPasswordCounter"
#define MPCheckpointIncrementPasswordCounter @"MPCheckpointIncrementPasswordCounter"
#define MPCheckpointEditPassword @"MPCheckpointEditPassword"
#define MPCheckpointEditLoginName @"MPCheckpointEditLoginName"
#define MPCheckpointUseType @"MPCheckpointUseType"
#define MPCheckpointDeleteSite @"MPCheckpointDeleteSite"
#define MPCheckpointShowGuide @"MPCheckpointShowGuide"
#define MPCheckpointShowSetup @"MPCheckpointShowSetup"
#define MPCheckpointChangeMP @"MPCheckpointChangeMP"
#define MPCheckpointMPErrorUbiquity @"MPCheckpointMPErrorUbiquity"
#define MPCheckpointLocalStoreReset @"MPCheckpointLocalStoreReset"
#define MPCheckpointCloudStoreReset @"MPCheckpointCloudStoreReset"
#define MPCheckpointSignInFailed @"MPCheckpointSignInFailed"
#define MPCheckpointSignedIn @"MPCheckpointSignedIn"
#define MPCheckpointConfig @"MPCheckpointConfig"
#define MPCheckpointCloud @"MPCheckpointCloud"
#define MPCheckpointSitesImported @"MPCheckpointSitesImported"
#define MPCheckpointSitesExported @"MPCheckpointSitesExported"
#define MPCheckpointExplicitMigration @"MPCheckpointExplicitMigration"
#define MPCheckpointReview @"MPCheckpointReview"
#define MPCheckpointApps @"MPCheckpointApps"
#define MPCheckpointApp @"MPCheckpointApp"
#define MPCheckpointEmergencyGenerator @"MPCheckpointEmergencyGenerator"
#define MPCheckpointLogs @"MPCheckpointLogs"
#define MPCheckpointStarted @"MPCheckpointStarted"
#define MPSignedInNotification @"MPSignedInNotification" #define MPSignedInNotification @"MPSignedInNotification"
#define MPSignedOutNotification @"MPSignedOutNotification" #define MPSignedOutNotification @"MPSignedOutNotification"
#define MPKeyForgottenNotification @"MPKeyForgottenNotification" #define MPKeyForgottenNotification @"MPKeyForgottenNotification"
@ -86,8 +57,3 @@ typedef NS_ENUM(NSUInteger, MPSiteType) {
#define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey" #define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey"
#define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey" #define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey"
static void MPCheckpoint(NSString *checkpoint, NSDictionary *attributes) {
inf(@"%@: %@", checkpoint, attributes);
}

View File

@ -138,18 +138,6 @@
@"Find the store from the user pulldown after logging in.", latestFeatures ) @"Find the store from the user pulldown after logging in.", latestFeatures )
viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil
cancelTitle:@"Thanks" otherTitles:nil]; cancelTitle:@"Thanks" otherTitles:nil];
MPCheckpoint( MPCheckpointStarted, @{
@"simulator" : PearlStringB( [PearlDeviceUtils isSimulator] ),
@"encrypted" : PearlStringB( [PearlDeviceUtils isAppEncrypted] ),
@"jailbroken" : PearlStringB( [PearlDeviceUtils isJailbroken] ),
@"platform" : [PearlDeviceUtils platform],
#ifdef APPSTORE
@"legal" : PearlStringB([PearlDeviceUtils isAppEncrypted]),
#else
@"legal" : @"YES",
#endif
} );
} }
@catch (id exception) { @catch (id exception) {
err( @"During Post-Startup: %@", exception ); err( @"During Post-Startup: %@", exception );
@ -293,6 +281,7 @@
inf( @"Re-activated" ); inf( @"Re-activated" );
[[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil];
PearlNotMainQueue( ^{
NSString *importHeader = @"# Master Password site export"; NSString *importHeader = @"# Master Password site export";
NSString *importedSitesString = [UIPasteboard generalPasteboard].string; NSString *importedSitesString = [UIPasteboard generalPasteboard].string;
if ([importedSitesString length] > [importHeader length] && if ([importedSitesString length] > [importHeader length] &&
@ -307,19 +296,13 @@
[self importSites:importedSitesString]; [self importSites:importedSitesString];
[UIPasteboard generalPasteboard].string = nil; [UIPasteboard generalPasteboard].string = nil;
} cancelTitle:@"No" otherTitles:@"Import Sites", nil]; } cancelTitle:@"No" otherTitles:@"Import Sites", nil];
} );
[super applicationDidBecomeActive:application]; [super applicationDidBecomeActive:application];
} }
#pragma mark - Behavior #pragma mark - Behavior
- (void)showReview {
[super showReview];
MPCheckpoint( MPCheckpointReview, nil );
}
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController { - (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
if (![PearlEMail canSendMail]) if (![PearlEMail canSendMail])
@ -522,8 +505,6 @@
[self signOutAnimated:YES]; [self signOutAnimated:YES];
if (didReset) if (didReset)
didReset(); didReset();
MPCheckpoint( MPCheckpointChangeMP, nil );
} }
cancelTitle:[PearlStrings get].commonButtonAbort cancelTitle:[PearlStrings get].commonButtonAbort
otherTitles:[PearlStrings get].commonButtonContinue, nil]; otherTitles:[PearlStrings get].commonButtonContinue, nil];
@ -563,19 +544,16 @@
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"]; [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"];
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"]; [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"];
[[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"]; [[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"];
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isSimulator] forKey:@"simulator"];
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isAppEncrypted] forKey:@"encrypted"];
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isJailbroken] forKey:@"jailbroken"];
[[Crashlytics sharedInstance] setObjectValue:[PearlDeviceUtils platform] forKey:@"platform"];
#ifdef APPSTORE
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isAppEncrypted] forKey:@"reviewedVersion"];
#else
[[Crashlytics sharedInstance] setBoolValue:YES forKey:@"reviewedVersion"];
#endif
#endif #endif
MPCheckpoint( MPCheckpointConfig, @{
@"rememberLogin" : @([[MPConfig get].rememberLogin boolValue]),
@"sendInfo" : @([[MPiOSConfig get].sendInfo boolValue]),
@"helpHidden" : @([[MPiOSConfig get].helpHidden boolValue]),
@"showQuickStart" : @([[MPiOSConfig get].showSetup boolValue]),
@"firstRun" : @([[PearlConfig get].firstRun boolValue]),
@"launchCount" : NilToNSNull( [PearlConfig get].launchCount ),
@"askForReviews" : @([[PearlConfig get].askForReviews boolValue]),
@"reviewAfterLaunches" : NilToNSNull( [PearlConfig get].reviewAfterLaunches ),
@"reviewedVersion" : NilToNSNull( [PearlConfig get].reviewedVersion )
} );
} }
} }

Binary file not shown.