Chromium Code Reviews| Index: components/autofill/browser/webdata/syncable_service_backend.h |
| diff --git a/components/autofill/browser/webdata/syncable_service_backend.h b/components/autofill/browser/webdata/syncable_service_backend.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..21e046cf96f26d9b761a3eaf442abc333203b2c3 |
| --- /dev/null |
| +++ b/components/autofill/browser/webdata/syncable_service_backend.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2013 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 COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_BACKEND_H_ |
| +#define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_BACKEND_H_ |
| + |
| +class WebDatabase; |
| + |
| +namespace autofill { |
| + |
| +class AutofillWebDataServiceObserverOnDBThread; |
| + |
| +// Intreface for doing Autofill work directly on the DB thread (used by |
|
Jói
2013/05/07 19:39:41
Intreface -> Interface
Cait (Slow)
2013/05/07 20:14:56
Done.
|
| +// Sync, mostly), without fully exposing the AutofillWebDataBackend to clients. |
| +class SyncableServiceBackend { |
|
Jói
2013/05/07 19:39:41
Should this be named AutofillSyncableServiceBacken
Cait (Slow)
2013/05/07 20:14:56
It's in the autofill namespace, so will usually ap
Jói
2013/05/07 20:19:15
With the namespace that seems fine to me; will lea
|
| + public: |
| + virtual ~SyncableServiceBackend() {} |
| + // Get a raw ptr to the WebDatabase |
|
Jói
2013/05/07 19:39:41
ptr -> pointer, and please end the sentence with a
Cait (Slow)
2013/05/07 20:14:56
Done.
|
| + virtual WebDatabase* GetDatabaseOnDB() = 0; |
| + |
| + // Add an observer to be notified of changes on the DB thread. |
| + virtual void AddObserver( |
| + AutofillWebDataServiceObserverOnDBThread* observer) = 0; |
| + // Remove an observer. |
| + virtual void RemoveObserver( |
| + AutofillWebDataServiceObserverOnDBThread* observer) = 0; |
| + |
| + // Remove expired elements from the database and commit if needed. |
| + virtual void RemoveExpiredFormElementsWrapper() = 0; |
| + |
| + // 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. |
|
Jói
2013/05/07 19:39:41
it asynchronously -> asynchronously
Cait (Slow)
2013/05/07 20:14:56
Done.
|
| + virtual void NotifyOfMultipleAutofillChanges() = 0; |
| +}; |
| + |
| +} // autofill |
|
Jói
2013/05/07 19:39:41
autofill -> namespace autofill
Cait (Slow)
2013/05/07 20:14:56
Done.
|
| + |
| +#endif //COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_BACKEND_H_ |
|
Jói
2013/05/07 19:39:41
two spaces before // and one after
Cait (Slow)
2013/05/07 20:14:56
Done.
|