void ewk_context_form_candidate_data_clear(Ewk_Context* context)
{
EINA_SAFETY_ON_NULL_RETURN(context);
-#if !defined(EWK_BRINGUP)
context->ClearCandidateData();
-#else
- LOG_EWK_API_MOCKUP();
-#endif
}
Eina_List* ewk_context_form_autofill_profile_get_all(Ewk_Context* context)
#include "eweb_context.h"
#include "base/synchronization/waitable_event.h"
+#include "components/autofill/content/browser/content_autofill_driver.h"
#include "content/public/browser/appcache_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/local_storage_usage_info.h"
#include "content/public/browser/dom_storage_context.h"
#include "browser/favicon/favicon_service.h"
+#include "browser/webdata/web_data_service_factory.h"
#include "gl/gl_shared_context_efl.h"
#include "net/http/http_cache.h"
#include "net/proxy/proxy_config_service_fixed.h"
return favicon;
}
+
+void EWebContext::ClearCandidateData() {
+#ifdef TIZEN_AUTOFILL_SUPPORT
+ WebDataServiceFactory* webDataServiceInstance = WebDataServiceFactory::GetInstance();
+ scoped_refptr<autofill::AutofillWebDataService> autofillWebDataService = webDataServiceInstance->GetAutofillWebDataForProfile();
+ if(autofillWebDataService) {
+ //RemoveFormElementsAddedBetween will schedule task on proper thread, it is done in WebDatabaseService::ScheduleDBTask
+ autofillWebDataService->RemoveFormElementsAddedBetween(base::Time(), base::Time::Max());
+ } else {
+ DLOG(WARNING) << "AutofillWebDataService is NULL";
+ }
+#else
+ DLOG(WARNING) << "TIZEN_AUTOFILL_SUPPORT is not enabled";
+#endif
+}