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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // information. Writing to this table is done by sync and | 153 // information. Writing to this table is done by sync and |
154 // on successful save of card to the server. | 154 // on successful save of card to the server. |
155 // When a server card is unmasked, it will stay here and | 155 // When a server card is unmasked, it will stay here and |
156 // will additionally be added in unmasked_credit_cards. | 156 // will additionally be added in unmasked_credit_cards. |
157 // | 157 // |
158 // id String assigned by the server to identify this card. | 158 // id String assigned by the server to identify this card. |
159 // This is opaque to the client. | 159 // This is opaque to the client. |
160 // status Server's status of this card. | 160 // status Server's status of this card. |
161 // TODO(brettw) define constants for this. | 161 // TODO(brettw) define constants for this. |
162 // name_on_card | 162 // name_on_card |
163 // type Type of the credit card. This is one of the | 163 // network Issuer network of the card. For example, "VISA". Renamed |
164 // kSyncCardType* strings. | 164 // from "type" in version 72. |
165 // last_four Last four digits of the card number. For de-duping | 165 // last_four Last four digits of the card number. For de-duping |
166 // with locally stored cards and generating descriptions. | 166 // with locally stored cards and generating descriptions. |
167 // exp_month Expiration month: 1-12 | 167 // exp_month Expiration month: 1-12 |
168 // exp_year Four-digit year: 2017 | 168 // exp_year Four-digit year: 2017 |
169 // | 169 // |
170 // unmasked_credit_cards | 170 // unmasked_credit_cards |
171 // When a masked credit credit card is unmasked and the | 171 // When a masked credit credit card is unmasked and the |
172 // full number is downloaded or when the full number is | 172 // full number is downloaded or when the full number is |
173 // available upon saving card to server, it will be stored | 173 // available upon saving card to server, it will be stored |
174 // here. | 174 // here. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 base::Time* date_last_used); | 324 base::Time* date_last_used); |
325 | 325 |
326 // Replaces existing autofill entries with the entries supplied in | 326 // Replaces existing autofill entries with the entries supplied in |
327 // the argument. If the entry does not already exist, it will be | 327 // the argument. If the entry does not already exist, it will be |
328 // added. | 328 // added. |
329 virtual bool UpdateAutofillEntries(const std::vector<AutofillEntry>& entries); | 329 virtual bool UpdateAutofillEntries(const std::vector<AutofillEntry>& entries); |
330 | 330 |
331 // Records a single Autofill profile in the autofill_profiles table. | 331 // Records a single Autofill profile in the autofill_profiles table. |
332 virtual bool AddAutofillProfile(const AutofillProfile& profile); | 332 virtual bool AddAutofillProfile(const AutofillProfile& profile); |
333 | 333 |
334 // Updates the database values for the specified profile. Mulit-value aware. | 334 // Updates the database values for the specified profile. Multi-value aware. |
335 virtual bool UpdateAutofillProfile(const AutofillProfile& profile); | 335 virtual bool UpdateAutofillProfile(const AutofillProfile& profile); |
336 | 336 |
337 // Removes a row from the autofill_profiles table. |guid| is the identifier | 337 // Removes a row from the autofill_profiles table. |guid| is the identifier |
338 // of the profile to remove. | 338 // of the profile to remove. |
339 virtual bool RemoveAutofillProfile(const std::string& guid); | 339 virtual bool RemoveAutofillProfile(const std::string& guid); |
340 | 340 |
341 // Retrieves a profile with guid |guid|. | 341 // Retrieves a profile with guid |guid|. |
342 std::unique_ptr<AutofillProfile> GetAutofillProfile(const std::string& guid); | 342 std::unique_ptr<AutofillProfile> GetAutofillProfile(const std::string& guid); |
343 | 343 |
344 // Retrieves local/server profiles in the database. | 344 // Retrieves local/server profiles in the database. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 bool MigrateToVersion60AddServerCards(); | 456 bool MigrateToVersion60AddServerCards(); |
457 bool MigrateToVersion61AddUsageStats(); | 457 bool MigrateToVersion61AddUsageStats(); |
458 bool MigrateToVersion62AddUsageStatsForUnmaskedCards(); | 458 bool MigrateToVersion62AddUsageStatsForUnmaskedCards(); |
459 bool MigrateToVersion63AddServerRecipientName(); | 459 bool MigrateToVersion63AddServerRecipientName(); |
460 bool MigrateToVersion64AddUnmaskDate(); | 460 bool MigrateToVersion64AddUnmaskDate(); |
461 bool MigrateToVersion65AddServerMetadataTables(); | 461 bool MigrateToVersion65AddServerMetadataTables(); |
462 bool MigrateToVersion66AddCardBillingAddress(); | 462 bool MigrateToVersion66AddCardBillingAddress(); |
463 bool MigrateToVersion67AddMaskedCardBillingAddress(); | 463 bool MigrateToVersion67AddMaskedCardBillingAddress(); |
464 bool MigrateToVersion70AddSyncMetadata(); | 464 bool MigrateToVersion70AddSyncMetadata(); |
465 bool MigrateToVersion71AddHasConvertedAndBillingAddressIdMetadata(); | 465 bool MigrateToVersion71AddHasConvertedAndBillingAddressIdMetadata(); |
| 466 bool MigrateToVersion72RenameCardTypeToIssuerNetwork(); |
466 | 467 |
467 // Max data length saved in the table, AKA the maximum length allowed for | 468 // Max data length saved in the table, AKA the maximum length allowed for |
468 // form data. | 469 // form data. |
469 // Copied to components/autofill/ios/browser/resources/autofill_controller.js. | 470 // Copied to components/autofill/ios/browser/resources/autofill_controller.js. |
470 static const size_t kMaxDataLength; | 471 static const size_t kMaxDataLength; |
471 | 472 |
472 private: | 473 private: |
473 FRIEND_TEST_ALL_PREFIXES(AutofillTableTest, Autofill); | 474 FRIEND_TEST_ALL_PREFIXES(AutofillTableTest, Autofill); |
474 FRIEND_TEST_ALL_PREFIXES(AutofillTableTest, Autofill_AddChanges); | 475 FRIEND_TEST_ALL_PREFIXES(AutofillTableTest, Autofill_AddChanges); |
475 FRIEND_TEST_ALL_PREFIXES( | 476 FRIEND_TEST_ALL_PREFIXES( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 bool InitModelTypeStateTable(); | 563 bool InitModelTypeStateTable(); |
563 | 564 |
564 std::unique_ptr<AutofillTableEncryptor> autofill_table_encryptor_; | 565 std::unique_ptr<AutofillTableEncryptor> autofill_table_encryptor_; |
565 | 566 |
566 DISALLOW_COPY_AND_ASSIGN(AutofillTable); | 567 DISALLOW_COPY_AND_ASSIGN(AutofillTable); |
567 }; | 568 }; |
568 | 569 |
569 } // namespace autofill | 570 } // namespace autofill |
570 | 571 |
571 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 572 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
OLD | NEW |