diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 01:23:12 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 01:23:12 +0000 |
commit | a7837ccc9c5db0b7a6f67bfbc420731aaef3ce04 (patch) | |
tree | eae6b51915d1f86262ea39483043da939e70d635 /chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm | |
parent | e03f3980cc903b21f1a17bb1aa51927107c19cec (diff) | |
download | chromium_src-a7837ccc9c5db0b7a6f67bfbc420731aaef3ce04.zip chromium_src-a7837ccc9c5db0b7a6f67bfbc420731aaef3ce04.tar.gz chromium_src-a7837ccc9c5db0b7a6f67bfbc420731aaef3ce04.tar.bz2 |
AutoFill remove defaults from settings dialog
The new AutoFill dialog mocks eliminate the need for a "default" address and credit card. Removing code related to UI for these defaults. Nib changes: Removed the "Default" radio button from each of the Nibs.
BUG=44621
TEST=AutoFillDialogControllerTest.*:-AutoFillDialogControllerTest.DefaultsChangingLogic
Review URL: http://codereview.chromium.org/2466002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm')
-rw-r--r-- | chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm b/chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm index 0151869..8e7b29c 100644 --- a/chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm +++ b/chrome/browser/autofill/autofill_credit_card_view_controller_mac.mm @@ -10,14 +10,11 @@ #import "chrome/browser/autofill/autofill_dialog_controller_mac.h" #include "chrome/browser/autofill/credit_card.h" #include "grit/generated_resources.h" -#import "third_party/GTM/Foundation/GTMNSObject+KeyValueObserving.h" // Private methods for the |AutoFillCreditCardViewController| class. @interface AutoFillCreditCardViewController (PrivateMethods) - (void)rebuildBillingAddressContents; - (void)rebuildShippingAddressContents; -- (void)creditCardsChanged:(GTMKeyValueChangeNotification*)notification; -- (void)defaultChanged:(GTMKeyValueChangeNotification*)notification; @end @implementation AutoFillCreditCardViewController @@ -45,28 +42,11 @@ // Setup initial state of popups. [self onAddressesChanged:self]; - - [parentController_ gtm_addObserver:self - forKeyPath:@"creditCardLabels" - selector:@selector(creditCardsChanged:) - userInfo:nil - options:0]; - [parentController_ gtm_addObserver:self - forKeyPath:@"defaultCreditCardLabel" - selector:@selector(defaultChanged:) - userInfo:nil - options:0]; } return self; } - (void)dealloc { - [parentController_ gtm_removeObserver:self - forKeyPath:@"creditCardLabels" - selector:@selector(creditCardsChanged:)]; - [parentController_ gtm_removeObserver:self - forKeyPath:@"defaultCreditCardLabel" - selector:@selector(defaultChanged:)]; [creditCardModel_ release]; [billingAddressContents_ release]; [shippingAddressContents_ release]; @@ -101,30 +81,6 @@ creditCard->set_shipping_address(string16()); } -- (void)creditCardsChanged:(GTMKeyValueChangeNotification*)notification { - [self willChangeValueForKey:@"canAlterDefault"]; - [self didChangeValueForKey:@"canAlterDefault"]; -} - -- (void)defaultChanged:(GTMKeyValueChangeNotification*)notification { - [self willChangeValueForKey:@"isDefault"]; - [self didChangeValueForKey:@"isDefault"]; -} - -- (BOOL)canAlterDefault { - return [[parentController_ creditCardLabels] count] > 1; -} - -- (BOOL)isDefault { - return [[creditCardModel_ label] isEqual: - [parentController_ defaultCreditCardLabel]]; -} - -- (void)setIsDefault:(BOOL)def { - [parentController_ setDefaultCreditCardLabel: - def ? [creditCardModel_ label] : nil]; -} - // Builds the |billingAddressContents_| array of strings from the list of // addresses returned by the |parentController_| and additional UI string. // Ensures that current selection is valid, if not reset it. |