| Index: components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| diff --git a/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc b/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| index f7e4f30c16bcbe3623fe6e6fe9c1db24742b385e..61765662e3dd8236eb1697d84c69eb372bf927b9 100644
|
| --- a/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| +++ b/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| @@ -49,9 +49,10 @@ WebDatabase* AutofillWebDataBackendImpl::GetDatabase() {
|
| return web_database_backend_->database();
|
| }
|
|
|
| -void AutofillWebDataBackendImpl::RemoveExpiredFormElementsWrapper() {
|
| +void AutofillWebDataBackendImpl::RemoveExpiredFormElements() {
|
| web_database_backend_->ExecuteWriteTask(
|
| - Bind(&AutofillWebDataBackendImpl::RemoveExpiredFormElements, this));
|
| + Bind(&AutofillWebDataBackendImpl::RemoveExpiredFormElementsImpl,
|
| + this));
|
| }
|
|
|
| void AutofillWebDataBackendImpl::NotifyOfMultipleAutofillChanges() {
|
| @@ -123,25 +124,6 @@ WebDatabase::State AutofillWebDataBackendImpl::RemoveFormElementsAddedBetween(
|
| return WebDatabase::COMMIT_NOT_NEEDED;
|
| }
|
|
|
| -WebDatabase::State AutofillWebDataBackendImpl::RemoveExpiredFormElements(
|
| - WebDatabase* db) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
|
| - AutofillChangeList changes;
|
| -
|
| - if (AutofillTable::FromWebDatabase(db)->RemoveExpiredFormElements(&changes)) {
|
| - if (!changes.empty()) {
|
| - // Post the notifications including the list of affected keys.
|
| - // This is sent here so that work resulting from this notification
|
| - // will be done on the DB thread, and not the UI thread.
|
| - FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnDBThread,
|
| - db_observer_list_,
|
| - AutofillEntriesChanged(changes));
|
| - }
|
| - return WebDatabase::COMMIT_NEEDED;
|
| - }
|
| - return WebDatabase::COMMIT_NOT_NEEDED;
|
| -}
|
| -
|
| WebDatabase::State AutofillWebDataBackendImpl::RemoveFormValueForElementName(
|
| const base::string16& name, const base::string16& value, WebDatabase* db) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
|
| @@ -325,6 +307,25 @@ WebDatabase::State
|
| return WebDatabase::COMMIT_NOT_NEEDED;
|
| }
|
|
|
| +WebDatabase::State AutofillWebDataBackendImpl::RemoveExpiredFormElementsImpl(
|
| + WebDatabase* db) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
|
| + AutofillChangeList changes;
|
| +
|
| + if (AutofillTable::FromWebDatabase(db)->RemoveExpiredFormElements(&changes)) {
|
| + if (!changes.empty()) {
|
| + // Post the notifications including the list of affected keys.
|
| + // This is sent here so that work resulting from this notification
|
| + // will be done on the DB thread, and not the UI thread.
|
| + FOR_EACH_OBSERVER(AutofillWebDataServiceObserverOnDBThread,
|
| + db_observer_list_,
|
| + AutofillEntriesChanged(changes));
|
| + }
|
| + return WebDatabase::COMMIT_NEEDED;
|
| + }
|
| + return WebDatabase::COMMIT_NOT_NEEDED;
|
| +}
|
| +
|
| void AutofillWebDataBackendImpl::DestroyAutofillProfileResult(
|
| const WDTypedResult* result) {
|
| DCHECK(result->GetType() == AUTOFILL_PROFILES_RESULT);
|
|
|