OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ |
7 | 7 |
| 8 #include "sync/internal_api/public/base/model_type.h" |
| 9 |
8 class WebDatabase; | 10 class WebDatabase; |
9 | 11 |
10 namespace autofill { | 12 namespace autofill { |
11 | 13 |
12 class AutofillWebDataServiceObserverOnDBThread; | 14 class AutofillWebDataServiceObserverOnDBThread; |
13 | 15 |
14 // Interface for doing Autofill work directly on the DB thread (used by | 16 // Interface for doing Autofill work directly on the DB thread (used by |
15 // Sync, mostly), without fully exposing the AutofillWebDataBackend to clients. | 17 // Sync, mostly), without fully exposing the AutofillWebDataBackend to clients. |
16 class AutofillWebDataBackend { | 18 class AutofillWebDataBackend { |
17 public: | 19 public: |
(...skipping 11 matching lines...) Expand all Loading... |
29 AutofillWebDataServiceObserverOnDBThread* observer) = 0; | 31 AutofillWebDataServiceObserverOnDBThread* observer) = 0; |
30 | 32 |
31 // Remove expired elements from the database and commit if needed. | 33 // Remove expired elements from the database and commit if needed. |
32 virtual void RemoveExpiredFormElements() = 0; | 34 virtual void RemoveExpiredFormElements() = 0; |
33 | 35 |
34 // Notifies listeners on both DB and UI threads that multiple changes have | 36 // Notifies listeners on both DB and UI threads that multiple changes have |
35 // been made to to Autofill records of the database. | 37 // been made to to Autofill records of the database. |
36 // NOTE: This method is intended to be called from the DB thread. The UI | 38 // NOTE: This method is intended to be called from the DB thread. The UI |
37 // thread notifications are asynchronous. | 39 // thread notifications are asynchronous. |
38 virtual void NotifyOfMultipleAutofillChanges() = 0; | 40 virtual void NotifyOfMultipleAutofillChanges() = 0; |
| 41 |
| 42 // Notifies listeners on the UI thread that sync has started for |model_type|. |
| 43 // NOTE: This method is intended to be called from the DB thread. The UI |
| 44 // thread notifications are asynchronous. |
| 45 virtual void NotifyThatSyncHasStarted(syncer::ModelType model_type) = 0; |
39 }; | 46 }; |
40 | 47 |
41 } // namespace autofill | 48 } // namespace autofill |
42 | 49 |
43 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ | 50 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_ |
OLD | NEW |