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

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
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/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 // Even though this is for development only, mask full credit card #'s. 956 // Even though this is for development only, mask full credit card #'s.
957 if (type.GetStorableType() == CREDIT_CARD_NUMBER && 957 if (type.GetStorableType() == CREDIT_CARD_NUMBER &&
958 field->value.size() > 4) { 958 field->value.size() > 4) {
959 map[type.ToString()] = base::ASCIIToUTF16("...(omitted)...") + 959 map[type.ToString()] = base::ASCIIToUTF16("...(omitted)...") +
960 field->value.substr(field->value.size() - 4, 4); 960 field->value.substr(field->value.size() - 4, 4);
961 } else { 961 } else {
962 map[type.ToString()] = field->value; 962 map[type.ToString()] = field->value;
963 } 963 }
964 } 964 }
965 965
966 DumpAutofillData(imported_credit_card); 966 DumpAutofillData(!!imported_credit_card);
967 } 967 }
968 #endif // ENABLE_FORM_DEBUG_DUMP 968 #endif // ENABLE_FORM_DEBUG_DUMP
969 969
970 // If credit card information was submitted, we need to confirm whether to 970 // If credit card information was submitted, we need to confirm whether to
971 // save it. 971 // save it.
972 if (imported_credit_card) { 972 if (imported_credit_card) {
973 // Don't offer to save any cards that were recently unmasked. 973 // Don't offer to save any cards that were recently unmasked.
974 for (const CreditCard& unmasked_card : recently_unmasked_cards_) { 974 for (const CreditCard& unmasked_card : recently_unmasked_cards_) {
975 if (unmasked_card.TypeAndLastFourDigits() == 975 if (unmasked_card.TypeAndLastFourDigits() ==
976 imported_credit_card->TypeAndLastFourDigits()) 976 imported_credit_card->TypeAndLastFourDigits())
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 if (i > 0) 1707 if (i > 0)
1708 fputs("Next oldest form:\n", file); 1708 fputs("Next oldest form:\n", file);
1709 } 1709 }
1710 fputs("\n", file); 1710 fputs("\n", file);
1711 1711
1712 fclose(file); 1712 fclose(file);
1713 } 1713 }
1714 #endif // ENABLE_FORM_DEBUG_DUMP 1714 #endif // ENABLE_FORM_DEBUG_DUMP
1715 1715
1716 } // namespace autofill 1716 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698