OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 6 #define COMPONENTS_AUTOFILL_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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 std::vector<AutofillChange>* changes); | 147 std::vector<AutofillChange>* changes); |
148 | 148 |
149 // Retrieves a vector of all values which have been recorded in the autofill | 149 // Retrieves a vector of all values which have been recorded in the autofill |
150 // table as the value in a form element with name |name| and which start with | 150 // table as the value in a form element with name |name| and which start with |
151 // |prefix|. The comparison of the prefix is case insensitive. | 151 // |prefix|. The comparison of the prefix is case insensitive. |
152 bool GetFormValuesForElementName(const base::string16& name, | 152 bool GetFormValuesForElementName(const base::string16& name, |
153 const base::string16& prefix, | 153 const base::string16& prefix, |
154 std::vector<base::string16>* values, | 154 std::vector<base::string16>* values, |
155 int limit); | 155 int limit); |
156 | 156 |
| 157 // Returns whether any form elements are stored in the database. |
| 158 bool HasFormElements(); |
| 159 |
157 // Removes rows from autofill_dates if they were created on or after | 160 // Removes rows from autofill_dates if they were created on or after |
158 // |delete_begin| and strictly before |delete_end|. Decrements the | 161 // |delete_begin| and strictly before |delete_end|. Decrements the |
159 // count of the corresponding rows in the autofill table, and | 162 // count of the corresponding rows in the autofill table, and |
160 // removes those rows if the count goes to 0. A list of all changed | 163 // removes those rows if the count goes to 0. A list of all changed |
161 // keys and whether each was updater or removed is returned in the | 164 // keys and whether each was updater or removed is returned in the |
162 // changes out parameter. | 165 // changes out parameter. |
163 bool RemoveFormElementsAddedBetween(const base::Time& delete_begin, | 166 bool RemoveFormElementsAddedBetween(const base::Time& delete_begin, |
164 const base::Time& delete_end, | 167 const base::Time& delete_end, |
165 std::vector<AutofillChange>* changes); | 168 std::vector<AutofillChange>* changes); |
166 | 169 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // created (on the UI thread), and cached here so that it can be used for | 371 // created (on the UI thread), and cached here so that it can be used for |
369 // migrations (on the DB thread). | 372 // migrations (on the DB thread). |
370 std::string app_locale_; | 373 std::string app_locale_; |
371 | 374 |
372 DISALLOW_COPY_AND_ASSIGN(AutofillTable); | 375 DISALLOW_COPY_AND_ASSIGN(AutofillTable); |
373 }; | 376 }; |
374 | 377 |
375 } // namespace autofill | 378 } // namespace autofill |
376 | 379 |
377 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ | 380 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_TABLE_H_ |
OLD | NEW |