| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "chrome/browser/webdata/web_data_service.h" |
| 9 |
| 10 AutofillWebDataServiceImpl::AutofillWebDataServiceImpl( |
| 11 scoped_refptr<WebDataService> service) |
| 12 : service_(service) { |
| 13 DCHECK(service.get()); |
| 14 } |
| 15 |
| 16 AutofillWebDataServiceImpl::~AutofillWebDataServiceImpl() { |
| 17 } |
| 18 |
| 19 void AutofillWebDataServiceImpl::AddFormFields( |
| 20 const std::vector<webkit::forms::FormField>& fields) { |
| 21 service_->AddFormFields(fields); |
| 22 } |
| 23 |
| 24 WebDataServiceBase::Handle |
| 25 AutofillWebDataServiceImpl::GetFormValuesForElementName( |
| 26 const string16& name, |
| 27 const string16& prefix, |
| 28 int limit, |
| 29 WebDataServiceConsumer* consumer) { |
| 30 return service_->GetFormValuesForElementName(name, prefix, limit, consumer); |
| 31 } |
| 32 |
| 33 void AutofillWebDataServiceImpl::RemoveExpiredFormElements() { |
| 34 service_->RemoveExpiredFormElements(); |
| 35 } |
| 36 |
| 37 void AutofillWebDataServiceImpl::RemoveFormValueForElementName( |
| 38 const string16& name, const string16& value) { |
| 39 service_->RemoveFormValueForElementName(name, value); |
| 40 } |
| 41 |
| 42 void AutofillWebDataServiceImpl::AddAutofillProfile( |
| 43 const AutofillProfile& profile) { |
| 44 service_->AddAutofillProfile(profile); |
| 45 } |
| 46 |
| 47 void AutofillWebDataServiceImpl::UpdateAutofillProfile( |
| 48 const AutofillProfile& profile) { |
| 49 service_->UpdateAutofillProfile(profile); |
| 50 } |
| 51 |
| 52 void AutofillWebDataServiceImpl::RemoveAutofillProfile( |
| 53 const std::string& guid) { |
| 54 service_->RemoveAutofillProfile(guid); |
| 55 } |
| 56 |
| 57 WebDataServiceBase::Handle AutofillWebDataServiceImpl::GetAutofillProfiles( |
| 58 WebDataServiceConsumer* consumer) { |
| 59 return service_->GetAutofillProfiles(consumer); |
| 60 } |
| 61 |
| 62 void AutofillWebDataServiceImpl::EmptyMigrationTrash(bool notify_sync) { |
| 63 service_->EmptyMigrationTrash(notify_sync); |
| 64 } |
| 65 |
| 66 void AutofillWebDataServiceImpl::AddCreditCard(const CreditCard& credit_card) { |
| 67 service_->AddCreditCard(credit_card); |
| 68 } |
| 69 |
| 70 void AutofillWebDataServiceImpl::UpdateCreditCard( |
| 71 const CreditCard& credit_card) { |
| 72 service_->UpdateCreditCard(credit_card); |
| 73 } |
| 74 |
| 75 void AutofillWebDataServiceImpl::RemoveCreditCard(const std::string& guid) { |
| 76 service_->RemoveCreditCard(guid); |
| 77 } |
| 78 |
| 79 WebDataServiceBase::Handle |
| 80 AutofillWebDataServiceImpl::GetCreditCards(WebDataServiceConsumer* consumer) { |
| 81 return service_->GetCreditCards(consumer); |
| 82 } |
| 83 |
| 84 void AutofillWebDataServiceImpl::CancelRequest(Handle h) { |
| 85 service_->CancelRequest(h); |
| 86 } |
| 87 |
| 88 content::NotificationSource |
| 89 AutofillWebDataServiceImpl::GetNotificationSource() { |
| 90 return service_->GetNotificationSource(); |
| 91 } |
| OLD | NEW |