Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10015)

Unified Diff: chrome/browser/webdata/autofill_web_data_service_impl.h

Issue 10908065: Introduce a couple of abstract bases for WebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/autofill_web_data_service_impl.h
diff --git a/chrome/browser/webdata/autofill_web_data_service_impl.h b/chrome/browser/webdata/autofill_web_data_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c85c18ec119cdf187b0c8e354ba0c72959778c4c
--- /dev/null
+++ b/chrome/browser/webdata/autofill_web_data_service_impl.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
+#define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "chrome/browser/api/webdata/autofill_web_data_service.h"
+
+class WebDataService;
+
+// This aggregates a WebDataService and delegates all method calls to
+// it.
+class AutofillWebDataServiceImpl : public AutofillWebDataService {
+ public:
+ explicit AutofillWebDataServiceImpl(scoped_refptr<WebDataService> service);
+ virtual ~AutofillWebDataServiceImpl();
+
+ // AutofillWebData implementation.
+ virtual void AddFormFields(
+ const std::vector<webkit::forms::FormField>& fields) OVERRIDE;
+ virtual WebDataServiceBase::Handle GetFormValuesForElementName(
+ const string16& name,
+ const string16& prefix,
+ int limit,
+ WebDataServiceConsumer* consumer) OVERRIDE;
+ virtual void RemoveExpiredFormElements() OVERRIDE;
+ virtual void RemoveFormValueForElementName(const string16& name,
+ const string16& value) OVERRIDE;
+ virtual void AddAutofillProfile(const AutofillProfile& profile) OVERRIDE;
+ virtual void UpdateAutofillProfile(const AutofillProfile& profile) OVERRIDE;
+ virtual void RemoveAutofillProfile(const std::string& guid) OVERRIDE;
+ virtual WebDataServiceBase::Handle GetAutofillProfiles(
+ WebDataServiceConsumer* consumer) OVERRIDE;
+ virtual void EmptyMigrationTrash(bool notify_sync) OVERRIDE;
+ virtual void AddCreditCard(const CreditCard& credit_card) OVERRIDE;
+ virtual void UpdateCreditCard(const CreditCard& credit_card) OVERRIDE;
+ virtual void RemoveCreditCard(const std::string& guid) OVERRIDE;
+ virtual WebDataServiceBase::Handle
+ GetCreditCards(WebDataServiceConsumer* consumer) OVERRIDE;
+
+ // WebDataServiceBase implementation.
+ virtual void CancelRequest(Handle h) OVERRIDE;
+ virtual content::NotificationSource GetNotificationSource() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl);
+
+ const scoped_refptr<WebDataService> service_;
+};
+
+#endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
« no previous file with comments | « chrome/browser/sync/test/integration/autofill_helper.cc ('k') | chrome/browser/webdata/autofill_web_data_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698