Index: chrome/browser/webdata/web_data_service.cc |
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc |
index c13e635a48e752b9b5b53201fbced07c9962e4b7..4dc5f12c77a6f782288f47685a14bcc544335994 100644 |
--- a/chrome/browser/webdata/web_data_service.cc |
+++ b/chrome/browser/webdata/web_data_service.cc |
@@ -80,14 +80,15 @@ WDKeywordsResult::WDKeywordsResult() |
WDKeywordsResult::~WDKeywordsResult() {} |
WebDataService::WebDataService() |
- : is_running_(false), |
- db_(NULL), |
- autocomplete_syncable_service_(NULL), |
- autofill_profile_syncable_service_(NULL), |
- failed_init_(false), |
- should_commit_(false), |
- next_request_handle_(1), |
- main_loop_(MessageLoop::current()) { |
+ : RefcountedProfileKeyedService(BrowserThread::UI), |
+ is_running_(false), |
+ db_(NULL), |
+ autocomplete_syncable_service_(NULL), |
+ autofill_profile_syncable_service_(NULL), |
+ failed_init_(false), |
+ should_commit_(false), |
+ next_request_handle_(1), |
+ main_loop_(MessageLoop::current()) { |
} |
// static |
@@ -104,18 +105,18 @@ void WebDataService::NotifyOfMultipleAutofillChanges( |
make_scoped_refptr(web_data_service))); |
} |
+void WebDataService::ShutdownOnUIThread() { |
+ ScheduleTask(FROM_HERE, |
+ Bind(&WebDataService::ShutdownSyncableServices, this)); |
+ UnloadDatabase(); |
+} |
+ |
bool WebDataService::Init(const FilePath& profile_path) { |
FilePath path = profile_path; |
path = path.Append(chrome::kWebDataFilename); |
return InitWithPath(path); |
} |
-void WebDataService::Shutdown() { |
- ScheduleTask(FROM_HERE, |
- Bind(&WebDataService::ShutdownSyncableServices, this)); |
- UnloadDatabase(); |
-} |
- |
bool WebDataService::IsRunning() const { |
return is_running_; |
} |