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

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

Issue 12937016: Rename AutofillWebDataServiceImpl --> AutofillWebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove c/b/api/autofill_webdata_service.h Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1
2 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
7 #define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
8
9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/api/webdata/autofill_web_data_service.h"
11 #include "chrome/browser/api/webdata/web_data_results.h"
12 #include "chrome/browser/api/webdata/web_data_service_base.h"
13 #include "chrome/browser/api/webdata/web_data_service_consumer.h"
14 #include "chrome/browser/webdata/web_database.h"
15
16 class AutofillChange;
17 class WebDatabaseService;
18
19 // This aggregates a WebDataService and delegates all method calls to
20 // it.
21 class AutofillWebDataServiceImpl : public AutofillWebDataService {
22 public:
23 AutofillWebDataServiceImpl(scoped_refptr<WebDatabaseService> wdbs,
24 const ProfileErrorCallback& callback);
25
26 // WebDataServiceBase overrides:
27 virtual content::NotificationSource GetNotificationSource() OVERRIDE;
28
29 // AutofillWebData implementation.
30 virtual void AddFormFields(
31 const std::vector<FormFieldData>& fields) OVERRIDE;
32 virtual WebDataServiceBase::Handle GetFormValuesForElementName(
33 const string16& name,
34 const string16& prefix,
35 int limit,
36 WebDataServiceConsumer* consumer) OVERRIDE;
37 virtual void RemoveExpiredFormElements() OVERRIDE;
38 virtual void RemoveFormValueForElementName(const string16& name,
39 const string16& value) OVERRIDE;
40 virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE;
41 virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE;
42 virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE;
43 virtual WebDataServiceBase::Handle GetAutofillProfiles(
44 WebDataServiceConsumer* consumer) OVERRIDE;
45 virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE;
46 virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE;
47 virtual void RemoveCreditCard(const std::string& guid) OVERRIDE;
48 virtual WebDataServiceBase::Handle
49 GetCreditCards(WebDataServiceConsumer* consumer) OVERRIDE;
50 virtual void RemoveAutofillProfilesAndCreditCardsModifiedBetween(
51 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
52 virtual void RemoveFormElementsAddedBetween(
53 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
54
55 protected:
56 virtual ~AutofillWebDataServiceImpl();
57
58 private:
59 WebDatabase::State AddFormElementsImpl(
60 const std::vector<FormFieldData>& fields, WebDatabase* db);
61 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl(
62 const string16& name, const string16& prefix, int limit, WebDatabase* db);
63 WebDatabase::State RemoveFormElementsAddedBetweenImpl(
64 const base::Time& delete_begin, const base::Time& delete_end,
65 WebDatabase* db);
66 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db);
67 WebDatabase::State RemoveFormValueForElementNameImpl(
68 const string16& name, const string16& value, WebDatabase* db);
69 WebDatabase::State AddAutofillProfileImpl(
70 const AutofillProfile& profile, WebDatabase* db);
71 WebDatabase::State UpdateAutofillProfileImpl(
72 const AutofillProfile& profile, WebDatabase* db);
73 WebDatabase::State RemoveAutofillProfileImpl(
74 const std::string& guid, WebDatabase* db);
75 scoped_ptr<WDTypedResult> GetAutofillProfilesImpl(WebDatabase* db);
76 WebDatabase::State AddCreditCardImpl(
77 const CreditCard& credit_card, WebDatabase* db);
78 WebDatabase::State UpdateCreditCardImpl(
79 const CreditCard& credit_card, WebDatabase* db);
80 WebDatabase::State RemoveCreditCardImpl(
81 const std::string& guid, WebDatabase* db);
82 scoped_ptr<WDTypedResult> GetCreditCardsImpl(WebDatabase* db);
83 WebDatabase::State RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
84 const base::Time& delete_begin, const base::Time& delete_end,
85 WebDatabase* db);
86
87 // Callbacks to ensure that sensitive info is destroyed if request is
88 // cancelled.
89 void DestroyAutofillProfileResult(const WDTypedResult* result);
90 void DestroyAutofillCreditCardResult(const WDTypedResult* result);
91
92 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl);
93 };
94
95 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698