OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/autofill/core/browser/webdata/autofill_table.h" | 5 #include "components/autofill/core/browser/webdata/autofill_table.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <map> | 10 #include <map> |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 447 |
448 std::string ServerStatusEnumToString(CreditCard::ServerStatus status) { | 448 std::string ServerStatusEnumToString(CreditCard::ServerStatus status) { |
449 switch (status) { | 449 switch (status) { |
450 case CreditCard::EXPIRED: | 450 case CreditCard::EXPIRED: |
451 return "EXPIRED"; | 451 return "EXPIRED"; |
452 | 452 |
453 case CreditCard::OK: | 453 case CreditCard::OK: |
454 return "OK"; | 454 return "OK"; |
455 } | 455 } |
456 | 456 |
457 NOTREACHED(); | 457 // NOTREACHED(); |
458 return "OK"; | 458 return "OK"; |
459 } | 459 } |
460 | 460 |
461 CreditCard::ServerStatus ServerStatusStringToEnum(const std::string& status) { | 461 CreditCard::ServerStatus ServerStatusStringToEnum(const std::string& status) { |
462 if (status == "EXPIRED") | 462 if (status == "EXPIRED") |
463 return CreditCard::EXPIRED; | 463 return CreditCard::EXPIRED; |
464 | 464 |
465 DCHECK_EQ("OK", status); | 465 // DCHECK_EQ("OK", status); |
466 return CreditCard::OK; | 466 return CreditCard::OK; |
467 } | 467 } |
468 | 468 |
469 } // namespace | 469 } // namespace |
470 | 470 |
471 // The maximum length allowed for form data. | 471 // The maximum length allowed for form data. |
472 const size_t AutofillTable::kMaxDataLength = 1024; | 472 const size_t AutofillTable::kMaxDataLength = 1024; |
473 | 473 |
474 AutofillTable::AutofillTable(const std::string& app_locale) | 474 AutofillTable::AutofillTable(const std::string& app_locale) |
475 : app_locale_(app_locale) { | 475 : app_locale_(app_locale) { |
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 "ADD COLUMN full_name VARCHAR"); | 2737 "ADD COLUMN full_name VARCHAR"); |
2738 } | 2738 } |
2739 | 2739 |
2740 bool AutofillTable::MigrateToVersion60AddServerCards() { | 2740 bool AutofillTable::MigrateToVersion60AddServerCards() { |
2741 return InitMaskedCreditCardsTable() && | 2741 return InitMaskedCreditCardsTable() && |
2742 InitUnmaskedCreditCardsTable() && | 2742 InitUnmaskedCreditCardsTable() && |
2743 InitServerAddressesTable(); | 2743 InitServerAddressesTable(); |
2744 } | 2744 } |
2745 | 2745 |
2746 } // namespace autofill | 2746 } // namespace autofill |
OLD | NEW |