OLD | NEW |
---|---|
(Empty) | |
1 #ifndef COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | |
2 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | |
3 | |
4 #include "base/memory/ref_counted.h" | |
5 #include "base/observer_list.h" | |
6 #include "components/autofill/browser/webdata/autofill_webdata.h" | |
7 #include "components/autofill/common/form_field_data.h" | |
8 #include "components/webdata/common/web_data_results.h" | |
9 #include "components/webdata/common/web_data_service_base.h" | |
10 #include "components/webdata/common/web_data_service_consumer.h" | |
11 #include "components/webdata/common/web_database.h" | |
12 | |
13 namespace autofill { | |
14 | |
15 class AutofillChange; | |
16 class AutofillProfile; | |
17 class AutofillWebDataServiceObserverOnDBThread; | |
18 class CreditCard; | |
19 | |
20 class AutofillWebDataBackend | |
Ilya Sherman
2013/04/30 00:14:08
Please add documentation describing the purpose of
Cait (Slow)
2013/04/30 22:24:40
Done.
| |
21 : public base::RefCountedThreadSafe<AutofillWebDataBackend, | |
22 content::BrowserThread::DeleteOnDBThread> { | |
Ilya Sherman
2013/04/30 00:14:08
Why is this class reference counted, rather than s
Cait (Slow)
2013/04/30 22:24:40
It needs to be ref-counted as AutofillWebDataServi
Ilya Sherman
2013/04/30 23:52:11
Seems like the AutofillWebDataService could just h
Cait (Slow)
2013/05/01 23:14:19
The async tasks have non-void return types (either
| |
23 public: | |
24 AutofillWebDataBackend(); | |
25 | |
26 WebDatabase::State AddFormElementsImpl( | |
Ilya Sherman
2013/04/30 00:14:08
nit: Could we drop the "Impl" suffix for all of th
Cait (Slow)
2013/04/30 22:24:40
Done.
| |
27 const std::vector<FormFieldData>& fields, WebDatabase* db); | |
Ilya Sherman
2013/04/30 00:14:08
nit: Please leave a blank line after each method d
Ilya Sherman
2013/04/30 00:14:08
nit: If the entire method declaration doesn't fit
Cait (Slow)
2013/04/30 22:24:40
Done.
Cait (Slow)
2013/04/30 22:24:40
Done.
| |
28 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl( | |
29 const base::string16& name, const base::string16& prefix, int limit, | |
30 WebDatabase* db); | |
31 WebDatabase::State RemoveFormElementsAddedBetweenImpl( | |
32 const base::Time& delete_begin, const base::Time& delete_end, | |
33 WebDatabase* db); | |
34 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db); | |
35 WebDatabase::State RemoveFormValueForElementNameImpl( | |
36 const base::string16& name, const base::string16& value, WebDatabase* db); | |
37 WebDatabase::State AddAutofillProfileImpl( | |
38 const AutofillProfile& profile, WebDatabase* db); | |
39 WebDatabase::State UpdateAutofillProfileImpl( | |
40 const AutofillProfile& profile, WebDatabase* db); | |
41 WebDatabase::State RemoveAutofillProfileImpl( | |
42 const std::string& guid, WebDatabase* db); | |
43 scoped_ptr<WDTypedResult> GetAutofillProfilesImpl(WebDatabase* db); | |
44 WebDatabase::State AddCreditCardImpl( | |
45 const CreditCard& credit_card, WebDatabase* db); | |
46 WebDatabase::State UpdateCreditCardImpl( | |
47 const CreditCard& credit_card, WebDatabase* db); | |
48 WebDatabase::State RemoveCreditCardImpl( | |
49 const std::string& guid, WebDatabase* db); | |
50 scoped_ptr<WDTypedResult> GetCreditCardsImpl(WebDatabase* db); | |
51 WebDatabase::State RemoveAutofillDataModifiedBetweenImpl( | |
52 const base::Time& delete_begin, const base::Time& delete_end, | |
53 WebDatabase* db); | |
54 | |
55 void AddObserver(AutofillWebDataServiceObserverOnDBThread* observer); | |
56 void RemoveObserver(AutofillWebDataServiceObserverOnDBThread* observer); | |
57 | |
58 protected: | |
59 virtual ~AutofillWebDataBackend(); | |
60 | |
61 private: | |
62 friend struct content::BrowserThread::DeleteOnThread< | |
63 content::BrowserThread::DB>; | |
64 friend class base::DeleteHelper<AutofillWebDataBackend>; | |
65 // We have to friend RCTS<> so WIN shared-lib build is happy (crbug/112250). | |
Ilya Sherman
2013/04/30 00:14:08
nit: Please prepend "http://" to the URL so that i
Cait (Slow)
2013/04/30 22:24:40
Done.
| |
66 friend class base::RefCountedThreadSafe<AutofillWebDataBackend, | |
67 content::BrowserThread::DeleteOnDBThread>; | |
68 | |
69 // Callbacks to ensure that sensitive info is destroyed if request is | |
70 // cancelled. | |
71 void DestroyAutofillProfileResult(const WDTypedResult* result); | |
72 void DestroyAutofillCreditCardResult(const WDTypedResult* result); | |
73 | |
74 ObserverList<AutofillWebDataServiceObserverOnDBThread> db_observer_list_; | |
75 | |
76 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataBackend); | |
77 }; | |
78 | |
79 } // namespace autofill | |
80 | |
81 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | |
Ilya Sherman
2013/04/30 00:14:08
Any chance you could convince the source control t
Cait (Slow)
2013/04/30 22:24:40
Done.
| |
OLD | NEW |