Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / components / autofill / core / browser / webdata / autofill_webdata_service.cc
index 9ba3fed..c8c65b7 100644 (file)
@@ -33,8 +33,8 @@ AutofillWebDataService::AutofillWebDataService(
     : WebDataServiceBase(wdbs, callback, ui_thread),
       ui_thread_(ui_thread),
       db_thread_(db_thread),
-      weak_ptr_factory_(this),
-      autofill_backend_(NULL) {
+      autofill_backend_(NULL),
+      weak_ptr_factory_(this) {
 
   base::Closure on_changed_callback = Bind(
       &AutofillWebDataService::NotifyAutofillMultipleChangedOnUIThread,
@@ -51,11 +51,11 @@ AutofillWebDataService::AutofillWebDataService(
           ui_thread),
       ui_thread_(ui_thread),
       db_thread_(db_thread),
-      weak_ptr_factory_(this),
       autofill_backend_(new AutofillWebDataBackendImpl(NULL,
           ui_thread_,
           db_thread_,
-          base::Closure())) {
+          base::Closure())),
+      weak_ptr_factory_(this) {
 }
 
 void AutofillWebDataService::ShutdownOnUIThread() {
@@ -129,6 +129,14 @@ WebDataServiceBase::Handle AutofillWebDataService::GetAutofillProfiles(
       consumer);
 }
 
+void AutofillWebDataService::UpdateAutofillEntries(
+    const std::vector<autofill::AutofillEntry>& autofill_entries) {
+  wdbs_->ScheduleDBTask(FROM_HERE,
+                        Bind(&AutofillWebDataBackendImpl::UpdateAutofillEntries,
+                             autofill_backend_,
+                             autofill_entries));
+}
+
 void AutofillWebDataService::AddCreditCard(const CreditCard& credit_card) {
   wdbs_->ScheduleDBTask(
       FROM_HERE,