| 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 8e2267cb2c7b6a2bd91ab92e0e4d4acc2557111e..7cbfc7417cb81bc43f150496dee401348b7f920a 100644
|
| --- a/chrome/browser/webdata/autofill_web_data_service_impl.h
|
| +++ b/chrome/browser/webdata/autofill_web_data_service.h
|
| @@ -3,11 +3,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"
|
| @@ -16,12 +18,35 @@
|
| 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 +78,7 @@ class AutofillWebDataServiceImpl : public AutofillWebDataService {
|
| const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
|
|
|
| protected:
|
| - virtual ~AutofillWebDataServiceImpl();
|
| + virtual ~AutofillWebDataService();
|
|
|
| private:
|
| WebDatabase::State AddFormElementsImpl(
|
| @@ -89,7 +114,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_
|
|
|