mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Fix bug 308356: fix saving keychain info by making sure we map return codes correctly. r=pinkerton
This commit is contained in:
parent
35149ea17d
commit
2f5d487548
@ -391,9 +391,16 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
|
||||
int result = [NSApp runModalForWindow:confirmStorePasswordPanel relativeToWindow:parent];
|
||||
[confirmStorePasswordPanel close];
|
||||
|
||||
// the results of hitButtonXX: map to the corresponding values in the
|
||||
// |KeychainPromptResult| enum so we can just cast and return
|
||||
return NS_STATIC_CAST(KeychainPromptResult, result);
|
||||
KeychainPromptResult keychainAction = kDontRemember;
|
||||
switch (result)
|
||||
{
|
||||
case NSAlertDefaultReturn: keychainAction = kSave; break;
|
||||
default:
|
||||
case NSAlertAlternateReturn: keychainAction = kDontRemember; break;
|
||||
case NSAlertOtherReturn: keychainAction = kNeverRemember; break;
|
||||
}
|
||||
|
||||
return keychainAction;
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user