Rename GetIconID to GetIconId
[chromium-blink-merge.git] / components / autofill / core / browser / webdata / autofill_webdata_backend.h
blob8b06ffb926f53b07cac0ccb8307c976abdd9494f
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.
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_
8 class WebDatabase;
10 namespace autofill {
12 class AutofillWebDataServiceObserverOnDBThread;
14 // Interface for doing Autofill work directly on the DB thread (used by
15 // Sync, mostly), without fully exposing the AutofillWebDataBackend to clients.
16 class AutofillWebDataBackend {
17 public:
18 virtual ~AutofillWebDataBackend() {}
20 // Get a raw pointer to the WebDatabase.
21 virtual WebDatabase* GetDatabase() = 0;
23 // Add an observer to be notified of changes on the DB thread.
24 virtual void AddObserver(
25 AutofillWebDataServiceObserverOnDBThread* observer) = 0;
27 // Remove an observer.
28 virtual void RemoveObserver(
29 AutofillWebDataServiceObserverOnDBThread* observer) = 0;
31 // Remove expired elements from the database and commit if needed.
32 virtual void RemoveExpiredFormElements() = 0;
34 // Notifies listeners on both DB and UI threads that multiple changes have
35 // been made to to Autofill records of the database.
36 // NOTE: This method is intended to be called from the DB thread. The UI
37 // thread notifications are asynchronous.
38 virtual void NotifyOfMultipleAutofillChanges() = 0;
41 } // namespace autofill
43 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_WEBDATA_BACKEND_H_