| 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 68668b87253650a334143dd1343fa9cb90b24094..bac35ad26f7fafd46d53d6d38ddf82526e415185 100644
|
| --- a/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| +++ b/components/autofill/browser/webdata/autofill_webdata_backend_impl.cc
|
| @@ -50,9 +50,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() {
|
| @@ -125,25 +126,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));
|
| @@ -349,6 +331,25 @@ WebDatabase::State AutofillWebDataBackendImpl::RemoveOriginURLsModifiedBetween(
|
| 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);
|
|
|