| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // card_number_encrypted | 121 // card_number_encrypted |
| 122 // Stores encrypted credit card number. | 122 // Stores encrypted credit card number. |
| 123 // date_modified The date on which this entry was last modified. | 123 // date_modified The date on which this entry was last modified. |
| 124 // Added in version 30. | 124 // Added in version 30. |
| 125 // origin The domain of origin for this profile. | 125 // origin The domain of origin for this profile. |
| 126 // Added in version 50. | 126 // Added in version 50. |
| 127 // | 127 // |
| 128 class AutofillTable : public WebDatabaseTable { | 128 class AutofillTable : public WebDatabaseTable { |
| 129 public: | 129 public: |
| 130 explicit AutofillTable(const std::string& app_locale); | 130 explicit AutofillTable(const std::string& app_locale); |
| 131 virtual ~AutofillTable(); | 131 ~AutofillTable() override; |
| 132 | 132 |
| 133 // Retrieves the AutofillTable* owned by |database|. | 133 // Retrieves the AutofillTable* owned by |database|. |
| 134 static AutofillTable* FromWebDatabase(WebDatabase* db); | 134 static AutofillTable* FromWebDatabase(WebDatabase* db); |
| 135 | 135 |
| 136 virtual WebDatabaseTable::TypeKey GetTypeKey() const override; | 136 WebDatabaseTable::TypeKey GetTypeKey() const override; |
| 137 virtual bool CreateTablesIfNecessary() override; | 137 bool CreateTablesIfNecessary() override; |
| 138 virtual bool IsSyncable() override; | 138 bool IsSyncable() override; |
| 139 virtual bool MigrateToVersion(int version, | 139 bool MigrateToVersion(int version, bool* update_compatible_version) override; |
| 140 bool* update_compatible_version) override; | |
| 141 | 140 |
| 142 // Records the form elements in |elements| in the database in the | 141 // Records the form elements in |elements| in the database in the |
| 143 // autofill table. A list of all added and updated autofill entries | 142 // autofill table. A list of all added and updated autofill entries |
| 144 // is returned in the changes out parameter. | 143 // is returned in the changes out parameter. |
| 145 bool AddFormFieldValues(const std::vector<FormFieldData>& elements, | 144 bool AddFormFieldValues(const std::vector<FormFieldData>& elements, |
| 146 std::vector<AutofillChange>* changes); | 145 std::vector<AutofillChange>* changes); |
| 147 | 146 |
| 148 // Records a single form element in the database in the autofill table. A list | 147 // Records a single form element in the database in the autofill table. A list |
| 149 // of all added and updated autofill entries is returned in the changes out | 148 // of all added and updated autofill entries is returned in the changes out |
| 150 // parameter. | 149 // parameter. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // created (on the UI thread), and cached here so that it can be used for | 358 // created (on the UI thread), and cached here so that it can be used for |
| 360 // migrations (on the DB thread). | 359 // migrations (on the DB thread). |
| 361 std::string app_locale_; | 360 std::string app_locale_; |
| 362 | 361 |
| 363 DISALLOW_COPY_AND_ASSIGN(AutofillTable); | 362 DISALLOW_COPY_AND_ASSIGN(AutofillTable); |
| 364 }; | 363 }; |
| 365 | 364 |
| 366 } // namespace autofill | 365 } // namespace autofill |
| 367 | 366 |
| 368 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 367 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
| OLD | NEW |