| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 base::Time delete_begin, | 176 base::Time delete_begin, |
| 177 base::Time delete_end, | 177 base::Time delete_end, |
| 178 int* how_many); | 178 int* how_many); |
| 179 | 179 |
| 180 // Increments the count in the row corresponding to |pair_id| by | 180 // Increments the count in the row corresponding to |pair_id| by |
| 181 // |delta|. Removes the row from the table and sets the | 181 // |delta|. Removes the row from the table and sets the |
| 182 // |was_removed| out parameter to true if the count becomes 0. | 182 // |was_removed| out parameter to true if the count becomes 0. |
| 183 bool AddToCountOfFormElement(int64 pair_id, int delta, bool* was_removed); | 183 bool AddToCountOfFormElement(int64 pair_id, int delta, bool* was_removed); |
| 184 | 184 |
| 185 // Gets the pair_id and count entries from name and value specified in | 185 // Gets the pair_id and count entries from name and value specified in |
| 186 // |element|. Sets *count to 0 if there is no such row in the table. | 186 // |element|. Sets *pair_id and *count to 0 if there is no such row in |
| 187 // the table. |
| 187 bool GetIDAndCountOfFormElement(const webkit_glue::FormField& element, | 188 bool GetIDAndCountOfFormElement(const webkit_glue::FormField& element, |
| 188 int64* pair_id, | 189 int64* pair_id, |
| 189 int* count); | 190 int* count); |
| 190 | 191 |
| 191 // Gets the count only given the pair_id. | 192 // Gets the count only given the pair_id. |
| 192 bool GetCountOfFormElement(int64 pair_id, int* count); | 193 bool GetCountOfFormElement(int64 pair_id, int* count); |
| 193 | 194 |
| 194 // Updates the count entry in the row corresponding to |pair_id| to |count|. | 195 // Updates the count entry in the row corresponding to |pair_id| to |count|. |
| 195 bool SetCountOfFormElement(int64 pair_id, int count); | 196 bool SetCountOfFormElement(int64 pair_id, int count); |
| 196 | 197 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 363 |
| 363 sql::Connection db_; | 364 sql::Connection db_; |
| 364 sql::MetaTable meta_table_; | 365 sql::MetaTable meta_table_; |
| 365 | 366 |
| 366 scoped_ptr<NotificationService> notification_service_; | 367 scoped_ptr<NotificationService> notification_service_; |
| 367 | 368 |
| 368 DISALLOW_COPY_AND_ASSIGN(WebDatabase); | 369 DISALLOW_COPY_AND_ASSIGN(WebDatabase); |
| 369 }; | 370 }; |
| 370 | 371 |
| 371 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ | 372 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ |
| OLD | NEW |