Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: components/autofill/browser/webdata/syncable_service_backend.h

Issue 14679005: Create an AutofillBackend interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments pt 1 Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_BACKEND_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_BACKEND_H_
7
8 class WebDatabase;
9
10 namespace autofill {
11
12 class AutofillWebDataServiceObserverOnDBThread;
13
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 SyncableServiceBackend {
Ilya Sherman 2013/05/08 00:39:06 I still think that it would be better to name this
Cait (Slow) 2013/05/08 19:16:01 Done.
17 public:
18 virtual ~SyncableServiceBackend() {}
19
20 // Get a raw pointer to the WebDatabase.
21 virtual WebDatabase* GetDatabaseOnDB() = 0;
Ilya Sherman 2013/05/08 00:39:06 nit: The "OnDB" suffix seems redundant, since this
Cait (Slow) 2013/05/08 19:16:01 Done.
22
23 // Add an observer to be notified of changes on the DB thread.
24 virtual void AddObserver(
25 AutofillWebDataServiceObserverOnDBThread* observer) = 0;
26
27 // Remove an observer.
28 virtual void RemoveObserver(
29 AutofillWebDataServiceObserverOnDBThread* observer) = 0;
30
31 // Remove expired elements from the database and commit if needed.
32 virtual void RemoveExpiredFormElementsWrapper() = 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 // asynchronously notifies listeners on the UI thread.
38 virtual void NotifyOfMultipleAutofillChanges() = 0;
39 };
40
41 } // namespace autofill
42
43 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_SYNCABLE_SERVICE_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698