| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/sql/connection.h" | 10 #include "app/sql/connection.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 // Removes row from the autofill tables for the given |name| |value| pair. | 198 // Removes row from the autofill tables for the given |name| |value| pair. |
| 199 bool RemoveFormElement(const string16& name, const string16& value); | 199 bool RemoveFormElement(const string16& name, const string16& value); |
| 200 | 200 |
| 201 // Records a single AutoFill profile in the autofill_profiles table. | 201 // Records a single AutoFill profile in the autofill_profiles table. |
| 202 bool AddAutoFillProfile(const AutoFillProfile& profile); | 202 bool AddAutoFillProfile(const AutoFillProfile& profile); |
| 203 | 203 |
| 204 // Updates the database values for the specified profile. | 204 // Updates the database values for the specified profile. |
| 205 bool UpdateAutoFillProfile(const AutoFillProfile& profile); | 205 bool UpdateAutoFillProfile(const AutoFillProfile& profile); |
| 206 | 206 |
| 207 // Removes a row from the autofill_profiles table. | 207 // Removes a row from the autofill_profiles table. |profile_id| is the |
| 208 bool RemoveAutoFillProfile(const AutoFillProfile& profile); | 208 // unique ID of the profile. |
| 209 bool RemoveAutoFillProfile(int profile_id); |
| 209 | 210 |
| 210 // Retrieves a profile with label |label|. The caller owns |profile|. | 211 // Retrieves a profile with label |label|. The caller owns |profile|. |
| 211 bool GetAutoFillProfileForLabel(const string16& label, | 212 bool GetAutoFillProfileForLabel(const string16& label, |
| 212 AutoFillProfile** profile); | 213 AutoFillProfile** profile); |
| 213 | 214 |
| 215 // Retrieves all profiles in the database. Caller owns the returned profiles. |
| 216 bool GetAutoFillProfiles(std::vector<AutoFillProfile*>* profiles); |
| 217 |
| 214 ////////////////////////////////////////////////////////////////////////////// | 218 ////////////////////////////////////////////////////////////////////////////// |
| 215 // | 219 // |
| 216 // Web Apps | 220 // Web Apps |
| 217 // | 221 // |
| 218 ////////////////////////////////////////////////////////////////////////////// | 222 ////////////////////////////////////////////////////////////////////////////// |
| 219 | 223 |
| 220 bool SetWebAppImage(const GURL& url, const SkBitmap& image); | 224 bool SetWebAppImage(const GURL& url, const SkBitmap& image); |
| 221 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); | 225 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); |
| 222 | 226 |
| 223 bool SetWebAppHasAllImages(const GURL& url, bool has_all_images); | 227 bool SetWebAppHasAllImages(const GURL& url, bool has_all_images); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 260 |
| 257 void MigrateOldVersionsAsNeeded(); | 261 void MigrateOldVersionsAsNeeded(); |
| 258 | 262 |
| 259 sql::Connection db_; | 263 sql::Connection db_; |
| 260 sql::MetaTable meta_table_; | 264 sql::MetaTable meta_table_; |
| 261 | 265 |
| 262 DISALLOW_COPY_AND_ASSIGN(WebDatabase); | 266 DISALLOW_COPY_AND_ASSIGN(WebDatabase); |
| 263 }; | 267 }; |
| 264 | 268 |
| 265 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ | 269 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ |
| OLD | NEW |