Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 #ifndef COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_DELEGATE_H_ | |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_DELEGATE_H_ | |
| 7 | |
| 8 class WebDatabase; | |
| 9 | |
| 10 namespace autofill { | |
| 11 | |
| 12 class AutofillWebDataBackend; | |
| 13 class AutofillWebDataServiceObserverOnDBThread; | |
| 14 | |
| 15 // Delegate class for doing Autofill work directly on the DB thread (used by | |
| 16 // Sync, mostly), without fully exposing the AutofillWebDataBackend to clients. | |
| 17 class SyncableServiceDelegate { | |
|
Ilya Sherman
2013/05/07 00:02:43
I'm still trying to wrap my mind around what this
Cait (Slow)
2013/05/07 19:22:07
Done.
| |
| 18 public: | |
| 19 virtual ~SyncableServiceDelegate() {} | |
| 20 | |
| 21 virtual WebDatabase* GetDatabase() = 0; | |
| 22 | |
| 23 // Add an observer to |autofill_backend_|. | |
|
Ilya Sherman
2013/05/07 00:02:43
nit: This class doesn't have an |autofill_backend_
Cait (Slow)
2013/05/07 19:22:07
Done.
| |
| 24 virtual void AddObserver( | |
| 25 AutofillWebDataServiceObserverOnDBThread* observer) = 0; | |
| 26 | |
| 27 // Remove an observer from |autofill_backend_|. | |
|
Ilya Sherman
2013/05/07 00:02:43
Ditto.
Cait (Slow)
2013/05/07 19:22:07
Done.
| |
| 28 virtual void RemoveObserver( | |
| 29 AutofillWebDataServiceObserverOnDBThread* observer) = 0; | |
| 30 | |
| 31 // Remove expired elements from |web_database_| and commit if needed. | |
| 32 virtual void RemoveExpiredFormElements() = 0; | |
| 33 | |
| 34 // Notifies listeners on the UI thread that multiple changes have been made to | |
| 35 // to Autofill records of the database. | |
| 36 // NOTE: This method is intended to be called from the DB thread. It | |
| 37 // it asynchronously notifies listeners on the UI thread. | |
| 38 // |web_data_service| may be NULL for testing purposes. | |
| 39 virtual void NotifyOfMultipleAutofillChanges() = 0; | |
| 40 }; | |
| 41 | |
| 42 } // autofill | |
| 43 | |
| 44 #endif //COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_DELEGATE_H_ | |
| OLD | NEW |