OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ |
6 #define CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | 6 #define CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ |
7 | 7 |
8 #include <vector> | |
9 | |
8 #include "chrome/browser/api/webdata/autofill_web_data.h" | 10 #include "chrome/browser/api/webdata/autofill_web_data.h" |
9 | 11 |
12 class AutofillChange; | |
13 class WebDatabaseService; | |
14 | |
10 namespace content { | 15 namespace content { |
11 class BrowserContext; | 16 class BrowserContext; |
12 } | 17 } |
13 | 18 |
19 typedef std::vector<AutofillChange> AutofillChangeList; | |
20 | |
14 // API for Autofill web data. | 21 // API for Autofill web data. |
15 class AutofillWebDataService | 22 class AutofillWebDataService |
16 : public AutofillWebData, | 23 : public AutofillWebData, |
17 public WebDataServiceBase { | 24 public WebDataServiceBase { |
18 public: | 25 public: |
19 // TODO(joi): This should take a ProfileErrorCallback once this | 26 AutofillWebDataService(scoped_refptr<WebDatabaseService> wdbs, |
20 // class doesn't simply delegate to WebDataService. | 27 const ProfileErrorCallback& callback); |
dhollowa
2013/03/21 16:44:07
nit: Indent
Cait (Slow)
2013/03/21 23:23:27
Done.
| |
21 AutofillWebDataService(); | |
22 | 28 |
23 // Retrieve an AutofillWebDataService for the given context. | 29 // Retrieve an AutofillWebDataService for the given context. |
24 // | 30 // |
25 // Can return NULL in some contexts. | 31 // Can return NULL in some contexts. |
26 static scoped_refptr<AutofillWebDataService> FromBrowserContext( | 32 static scoped_refptr<AutofillWebDataService> FromBrowserContext( |
27 content::BrowserContext* context); | 33 content::BrowserContext* context); |
28 | 34 |
35 // Notifies listeners on the UI thread that multiple changes have been made to | |
36 // to Autofill records of the database. | |
37 // NOTE: This method is intended to be called from the DB thread. It | |
38 // it asynchronously notifies listeners on the UI thread. | |
39 // |web_data_service| may be NULL for testing purposes. | |
40 static void NotifyOfMultipleAutofillChanges( | |
41 AutofillWebDataService* web_data_service); | |
42 | |
29 protected: | 43 protected: |
30 virtual ~AutofillWebDataService() {} | 44 virtual ~AutofillWebDataService() {} |
31 }; | 45 }; |
32 | 46 |
33 #endif // CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | 47 #endif // CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ |
OLD | NEW |