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

Unified Diff: chrome/browser/autofill/autofill_credit_card_model_mac.mm

Issue 6621076: [Mac] Remove native/Cocoa preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase switch removal Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_credit_card_model_mac.mm
diff --git a/chrome/browser/autofill/autofill_credit_card_model_mac.mm b/chrome/browser/autofill/autofill_credit_card_model_mac.mm
deleted file mode 100644
index 2f0e3c028bc39246bd344c586187a439a73cfa13..0000000000000000000000000000000000000000
--- a/chrome/browser/autofill/autofill_credit_card_model_mac.mm
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/sys_string_conversions.h"
-#import "chrome/browser/autofill/autofill_credit_card_model_mac.h"
-#include "chrome/browser/autofill/credit_card.h"
-#include "grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
-
-
-@implementation AutoFillCreditCardModel
-
-@synthesize nameOnCard = nameOnCard_;
-@synthesize creditCardNumber = creditCardNumber_;
-@synthesize expirationMonth = expirationMonth_;
-@synthesize expirationYear = expirationYear_;
-
-- (id)initWithCreditCard:(const CreditCard&)creditCard {
- if ((self = [super init])) {
- [self setNameOnCard:SysUTF16ToNSString(
- creditCard.GetFieldText(AutofillType(CREDIT_CARD_NAME)))];
- [self setCreditCardNumber:SysUTF16ToNSString(
- creditCard.GetFieldText(AutofillType(CREDIT_CARD_NUMBER)))];
- [self setExpirationMonth:SysUTF16ToNSString(
- creditCard.GetFieldText(AutofillType(CREDIT_CARD_EXP_MONTH)))];
- [self setExpirationYear:SysUTF16ToNSString(
- creditCard.GetFieldText(AutofillType(CREDIT_CARD_EXP_4_DIGIT_YEAR)))];
- }
- return self;
-}
-
-- (void)dealloc {
- [nameOnCard_ release];
- [creditCardNumber_ release];
- [expirationMonth_ release];
- [expirationYear_ release];
- [super dealloc];
-}
-
-- (void)copyModelToCreditCard:(CreditCard*)creditCard {
- DCHECK(creditCard);
- creditCard->SetInfo(AutofillType(CREDIT_CARD_NAME),
- base::SysNSStringToUTF16([self nameOnCard]));
- creditCard->SetInfo(AutofillType(CREDIT_CARD_NUMBER),
- base::SysNSStringToUTF16([self creditCardNumber]));
- creditCard->SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH),
- base::SysNSStringToUTF16([self expirationMonth]));
- creditCard->SetInfo(AutofillType(CREDIT_CARD_EXP_4_DIGIT_YEAR),
- base::SysNSStringToUTF16([self expirationYear]));
-}
-
-@end

Powered by Google App Engine
This is Rietveld 408576698