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

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

Issue 10908065: Introduce a couple of abstract bases for WebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/webdata/web_data_service_factory.cc
diff --git a/chrome/browser/webdata/web_data_service_factory.cc b/chrome/browser/webdata/web_data_service_factory.cc
index f86f28fd12b88c0580eb5f88245ef94eaedaf5aa..1dddaf890e40d5552a97ec5bd288c43ed7827ed9 100644
--- a/chrome/browser/webdata/web_data_service_factory.cc
+++ b/chrome/browser/webdata/web_data_service_factory.cc
@@ -6,9 +6,21 @@
#include "base/file_path.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/webdata/autofill_web_data_service_impl.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_constants.h"
+// static
+scoped_ptr<AutofillWebDataService> AutofillWebDataServiceImpl::ForContext(
+ content::BrowserContext* context) {
+ // TODO(joi): Does the implicit/explicit distinction really matter?
erikwright (departed) 2012/09/11 20:49:06 Presumably you will answer this question before co
+ // It's just used for a DCHECK.
+ scoped_refptr<WebDataService> service = WebDataServiceFactory::GetForProfile(
+ static_cast<Profile*>(context), Profile::EXPLICIT_ACCESS);
+ return scoped_ptr<AutofillWebDataService>(
+ new AutofillWebDataServiceImpl(service));
+}
+
WebDataServiceFactory::WebDataServiceFactory()
: RefcountedProfileKeyedServiceFactory(
"WebDataService",

Powered by Google App Engine
This is Rietveld 408576698