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

Unified Diff: chrome/browser/webdata/web_data_service.cc

Issue 9834056: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_data_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e52e167370a636a10f89f8b547f936040c652fec..b2d45872dacf2575adc50a2876afed076b2c560a 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -78,14 +78,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
@@ -102,18 +103,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_;
}
« no previous file with comments | « chrome/browser/webdata/web_data_service.h ('k') | chrome/browser/webdata/web_data_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698