| Index: chrome/browser/webdata/autofill_web_data_service.h
|
| diff --git a/chrome/browser/webdata/autofill_web_data_service_impl.h b/chrome/browser/webdata/autofill_web_data_service.h
|
| similarity index 73%
|
| rename from chrome/browser/webdata/autofill_web_data_service_impl.h
|
| rename to chrome/browser/webdata/autofill_web_data_service.h
|
| index 4b6fca38469684377bf6fb7cd56c89fb7da55af7..be55351911830704ee4867f86d8d7711f8191806 100644
|
| --- a/chrome/browser/webdata/autofill_web_data_service_impl.h
|
| +++ b/chrome/browser/webdata/autofill_web_data_service.h
|
| @@ -2,11 +2,13 @@
|
| // 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_
|
| +#ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_
|
| +#define CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_
|
| +
|
| +#include <vector>
|
|
|
| #include "base/memory/ref_counted.h"
|
| -#include "chrome/browser/api/webdata/autofill_web_data_service.h"
|
| +#include "chrome/browser/api/webdata/autofill_web_data.h"
|
| #include "chrome/browser/api/webdata/web_data_results.h"
|
| #include "chrome/browser/api/webdata/web_data_service_base.h"
|
| #include "chrome/browser/api/webdata/web_data_service_consumer.h"
|
| @@ -15,12 +17,34 @@
|
| class AutofillChange;
|
| class WebDatabaseService;
|
|
|
| -// This aggregates a WebDataService and delegates all method calls to
|
| -// it.
|
| -class AutofillWebDataServiceImpl : public AutofillWebDataService {
|
| +namespace content {
|
| +class BrowserContext;
|
| +}
|
| +
|
| +typedef std::vector<AutofillChange> AutofillChangeList;
|
| +
|
| +// API for Autofill web data.
|
| +class AutofillWebDataService
|
| + : public AutofillWebData,
|
| + public WebDataServiceBase {
|
| public:
|
| - AutofillWebDataServiceImpl(scoped_refptr<WebDatabaseService> wdbs,
|
| - const ProfileErrorCallback& callback);
|
| + AutofillWebDataService();
|
| +
|
| + AutofillWebDataService(scoped_refptr<WebDatabaseService> wdbs,
|
| + const ProfileErrorCallback& callback);
|
| +
|
| + // Retrieve an AutofillWebDataService for the given context.
|
| + // Can return NULL in some contexts.
|
| + static scoped_refptr<AutofillWebDataService> FromBrowserContext(
|
| + content::BrowserContext* context);
|
| +
|
| + // Notifies listeners on the UI thread that multiple changes have been made to
|
| + // to Autofill records of the database.
|
| + // NOTE: This method is intended to be called from the DB thread. It
|
| + // it asynchronously notifies listeners on the UI thread.
|
| + // |web_data_service| may be NULL for testing purposes.
|
| + static void NotifyOfMultipleAutofillChanges(
|
| + AutofillWebDataService* web_data_service);
|
|
|
| // WebDataServiceBase overrides:
|
| virtual content::NotificationSource GetNotificationSource() OVERRIDE;
|
| @@ -53,7 +77,7 @@ class AutofillWebDataServiceImpl : public AutofillWebDataService {
|
|
|
|
|
| protected:
|
| - virtual ~AutofillWebDataServiceImpl();
|
| + virtual ~AutofillWebDataService();
|
|
|
| private:
|
| WebDatabase::State AddFormElementsImpl(
|
| @@ -89,7 +113,7 @@ class AutofillWebDataServiceImpl : public AutofillWebDataService {
|
| void DestroyAutofillProfileResult(const WDTypedResult* result);
|
| void DestroyAutofillCreditCardResult(const WDTypedResult* result);
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(AutofillWebDataService);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_IMPL_H_
|
| +#endif // CHROME_BROWSER_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_
|
|
|