| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool AddAutofillFormElements( | 135 bool AddAutofillFormElements( |
| 136 const std::vector<webkit_glue::AutofillForm::Element>& elements); | 136 const std::vector<webkit_glue::AutofillForm::Element>& elements); |
| 137 | 137 |
| 138 // Records a single form element in in the database in the autofill table. | 138 // Records a single form element in in the database in the autofill table. |
| 139 bool AddAutofillFormElement( | 139 bool AddAutofillFormElement( |
| 140 const webkit_glue::AutofillForm::Element& element); | 140 const webkit_glue::AutofillForm::Element& element); |
| 141 | 141 |
| 142 // Retrieves a vector of all values which have been recorded in the autofill | 142 // Retrieves a vector of all values which have been recorded in the autofill |
| 143 // table as the value in a form element with name |name| and which start with | 143 // table as the value in a form element with name |name| and which start with |
| 144 // |prefix|. The comparison of the prefix is case insensitive. | 144 // |prefix|. The comparison of the prefix is case insensitive. |
| 145 bool GetFormValuesForElementName(const std::wstring& name, | 145 bool GetFormValuesForElementName(const string16& name, |
| 146 const std::wstring& prefix, | 146 const string16& prefix, |
| 147 std::vector<std::wstring>* values, | 147 std::vector<string16>* values, |
| 148 int limit); | 148 int limit); |
| 149 | 149 |
| 150 // Removes rows from autofill_dates if they were created on or after | 150 // Removes rows from autofill_dates if they were created on or after |
| 151 // |delete_begin| and strictly before |delete_end|. Decrements the count of | 151 // |delete_begin| and strictly before |delete_end|. Decrements the count of |
| 152 // the corresponding rows in the autofill table, and removes those rows if the | 152 // the corresponding rows in the autofill table, and removes those rows if the |
| 153 // count goes to 0. | 153 // count goes to 0. |
| 154 bool RemoveFormElementsAddedBetween(base::Time delete_begin, | 154 bool RemoveFormElementsAddedBetween(base::Time delete_begin, |
| 155 base::Time delete_end); | 155 base::Time delete_end); |
| 156 | 156 |
| 157 // Removes from autofill_dates rows with given pair_id where date_created lies | 157 // Removes from autofill_dates rows with given pair_id where date_created lies |
| (...skipping 26 matching lines...) Expand all Loading... |
| 184 const webkit_glue::AutofillForm::Element& element, | 184 const webkit_glue::AutofillForm::Element& element, |
| 185 int64* pair_id); | 185 int64* pair_id); |
| 186 | 186 |
| 187 // Adds a new row to the autofill_dates table. | 187 // Adds a new row to the autofill_dates table. |
| 188 bool InsertPairIDAndDate(int64 pair_id, base::Time date_created); | 188 bool InsertPairIDAndDate(int64 pair_id, base::Time date_created); |
| 189 | 189 |
| 190 // Removes row from the autofill tables given |pair_id|. | 190 // Removes row from the autofill tables given |pair_id|. |
| 191 bool RemoveFormElementForID(int64 pair_id); | 191 bool RemoveFormElementForID(int64 pair_id); |
| 192 | 192 |
| 193 // Removes row from the autofill tables for the given |name| |value| pair. | 193 // Removes row from the autofill tables for the given |name| |value| pair. |
| 194 bool RemoveFormElement(const std::wstring& name, const std::wstring& value); | 194 bool RemoveFormElement(const string16& name, const string16& value); |
| 195 | 195 |
| 196 ////////////////////////////////////////////////////////////////////////////// | 196 ////////////////////////////////////////////////////////////////////////////// |
| 197 // | 197 // |
| 198 // Web Apps | 198 // Web Apps |
| 199 // | 199 // |
| 200 ////////////////////////////////////////////////////////////////////////////// | 200 ////////////////////////////////////////////////////////////////////////////// |
| 201 | 201 |
| 202 bool SetWebAppImage(const GURL& url, const SkBitmap& image); | 202 bool SetWebAppImage(const GURL& url, const SkBitmap& image); |
| 203 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); | 203 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); |
| 204 | 204 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 225 | 225 |
| 226 void MigrateOldVersionsAsNeeded(); | 226 void MigrateOldVersionsAsNeeded(); |
| 227 | 227 |
| 228 sql::Connection db_; | 228 sql::Connection db_; |
| 229 sql::MetaTable meta_table_; | 229 sql::MetaTable meta_table_; |
| 230 | 230 |
| 231 DISALLOW_COPY_AND_ASSIGN(WebDatabase); | 231 DISALLOW_COPY_AND_ASSIGN(WebDatabase); |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ | 234 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ |
| OLD | NEW |