| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | |
| 6 #define CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "chrome/browser/api/webdata/autofill_web_data.h" | |
| 11 | |
| 12 class AutofillChange; | |
| 13 class WebDatabaseService; | |
| 14 | |
| 15 namespace content { | |
| 16 class BrowserContext; | |
| 17 } | |
| 18 | |
| 19 typedef std::vector<AutofillChange> AutofillChangeList; | |
| 20 | |
| 21 // API for Autofill web data. | |
| 22 class AutofillWebDataService | |
| 23 : public AutofillWebData, | |
| 24 public WebDataServiceBase { | |
| 25 public: | |
| 26 AutofillWebDataService(); | |
| 27 | |
| 28 AutofillWebDataService(scoped_refptr<WebDatabaseService> wdbs, | |
| 29 const ProfileErrorCallback& callback); | |
| 30 | |
| 31 // Retrieve an AutofillWebDataService for the given context. | |
| 32 // | |
| 33 // Can return NULL in some contexts. | |
| 34 static scoped_refptr<AutofillWebDataService> FromBrowserContext( | |
| 35 content::BrowserContext* context); | |
| 36 | |
| 37 // Notifies listeners on the UI thread that multiple changes have been made to | |
| 38 // to Autofill records of the database. | |
| 39 // NOTE: This method is intended to be called from the DB thread. It | |
| 40 // it asynchronously notifies listeners on the UI thread. | |
| 41 // |web_data_service| may be NULL for testing purposes. | |
| 42 static void NotifyOfMultipleAutofillChanges( | |
| 43 AutofillWebDataService* web_data_service); | |
| 44 | |
| 45 protected: | |
| 46 virtual ~AutofillWebDataService() {} | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_API_WEBDATA_AUTOFILL_WEB_DATA_SERVICE_H_ | |
| OLD | NEW |