Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: chrome/browser/webdata/web_database.h

Issue 1789001: AutoFill crash in CreditCard::SetInfo(). (Closed)
Patch Set: Virtual back to original. Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 bool GetAutoFillProfileForID(int profile_id, AutoFillProfile** profile); 230 bool GetAutoFillProfileForID(int profile_id, AutoFillProfile** profile);
231 231
232 // Retrieves a profile with label |label|. The caller owns |profile|. 232 // Retrieves a profile with label |label|. The caller owns |profile|.
233 bool GetAutoFillProfileForLabel(const string16& label, 233 bool GetAutoFillProfileForLabel(const string16& label,
234 AutoFillProfile** profile); 234 AutoFillProfile** profile);
235 235
236 // Retrieves all profiles in the database. Caller owns the returned profiles. 236 // Retrieves all profiles in the database. Caller owns the returned profiles.
237 virtual bool GetAutoFillProfiles(std::vector<AutoFillProfile*>* profiles); 237 virtual bool GetAutoFillProfiles(std::vector<AutoFillProfile*>* profiles);
238 238
239 // Records a single credit card in the credit_cards table. 239 // Records a single credit card in the credit_cards table.
240 bool AddCreditCard(const CreditCard& creditcard); 240 bool AddCreditCard(const CreditCard& credit_card);
241 241
242 // Updates the database values for the specified profile. 242 // Updates the database values for the specified credit card.
243 bool UpdateCreditCard(const CreditCard& profile); 243 bool UpdateCreditCard(const CreditCard& credit_card);
244 244
245 // Removes a row from the autofill_profiles table. |profile_id| is the 245 // Removes a row from the credit_cards table. |credit_card_id| is the
246 // unique ID of the profile to remove. 246 // unique ID of the credit card to remove.
247 bool RemoveCreditCard(int profile_id); 247 bool RemoveCreditCard(int credit_card_id);
248 248
249 // Retrieves a profile with label |label|. The caller owns |profile|. 249 // Retrieves a credit card with label |label|. The caller owns
250 // |credit_card_id|.
250 bool GetCreditCardForLabel(const string16& label, 251 bool GetCreditCardForLabel(const string16& label,
251 CreditCard** profile); 252 CreditCard** credit_card);
252 253
253 // Retrieves credit card for a card with unique id |card_id|. 254 // Retrieves credit card for a card with unique id |credit_card_id|.
254 bool GetCreditCardForID(int card_id, CreditCard** card); 255 bool GetCreditCardForID(int credit_card_id, CreditCard** credit_card);
255 256
256 // Retrieves all profiles in the database. Caller owns the returned profiles. 257 // Retrieves all credit cards in the database. Caller owns the returned
257 virtual bool GetCreditCards(std::vector<CreditCard*>* profiles); 258 // credit cards.
259 virtual bool GetCreditCards(std::vector<CreditCard*>* credit_cards);
258 260
259 ////////////////////////////////////////////////////////////////////////////// 261 //////////////////////////////////////////////////////////////////////////////
260 // 262 //
261 // Web Apps 263 // Web Apps
262 // 264 //
263 ////////////////////////////////////////////////////////////////////////////// 265 //////////////////////////////////////////////////////////////////////////////
264 266
265 bool SetWebAppImage(const GURL& url, const SkBitmap& image); 267 bool SetWebAppImage(const GURL& url, const SkBitmap& image);
266 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); 268 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images);
267 269
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 312
311 sql::Connection db_; 313 sql::Connection db_;
312 sql::MetaTable meta_table_; 314 sql::MetaTable meta_table_;
313 315
314 scoped_ptr<NotificationService> notification_service_; 316 scoped_ptr<NotificationService> notification_service_;
315 317
316 DISALLOW_COPY_AND_ASSIGN(WebDatabase); 318 DISALLOW_COPY_AND_ASSIGN(WebDatabase);
317 }; 319 };
318 320
319 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_ 321 #endif // CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_type_unittest.cc ('k') | chrome/browser/webdata/web_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698