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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 9949024: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-base 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
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 5587743b2a548ae9e0a21352d996dbe0c5e9b8e5..beed8b2d2e044736e0df90050eb7e0c3893cb4ca 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -227,7 +227,6 @@ ProfileImpl::ProfileImpl(const FilePath& path,
host_content_settings_map_(NULL),
history_service_created_(false),
favicon_service_created_(false),
- created_web_data_service_(false),
start_time_(Time::Now()),
delegate_(delegate),
predictor_(NULL),
@@ -485,14 +484,12 @@ ProfileImpl::~ProfileImpl() {
ProfileDependencyManager::GetInstance()->DestroyProfileServices(this);
- // Both HistoryService and WebDataService maintain threads for background
+ // HistoryService maintains threads for background
// processing. Its possible each thread still has tasks on it that have
// increased the ref count of the service. In such a situation, when we
// decrement the refcount, it won't be 0, and the threads/databases aren't
// properly shut down. By explicitly calling Cleanup/Shutdown we ensure the
// databases are properly closed.
- if (web_data_service_.get())
- web_data_service_->Shutdown();
if (top_sites_.get())
top_sites_->Shutdown();
@@ -810,25 +807,6 @@ history::ShortcutsBackend* ProfileImpl::GetShortcutsBackend() {
return shortcuts_backend_.get();
}
-WebDataService* ProfileImpl::GetWebDataService(ServiceAccessType sat) {
- if (!created_web_data_service_)
- CreateWebDataService();
- return web_data_service_.get();
-}
-
-WebDataService* ProfileImpl::GetWebDataServiceWithoutCreating() {
- return web_data_service_.get();
-}
-
-void ProfileImpl::CreateWebDataService() {
- DCHECK(!created_web_data_service_ && web_data_service_.get() == NULL);
- created_web_data_service_ = true;
- scoped_refptr<WebDataService> wds(new WebDataService());
- if (!wds->Init(GetPath()))
- return;
- web_data_service_.swap(wds);
-}
-
DownloadManager* ProfileImpl::GetDownloadManager() {
return DownloadServiceFactory::GetForProfile(this)->GetDownloadManager();
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/search_engines/search_provider_install_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698