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

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

Issue 777863002: Introduce new component webdata_services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile as static_library instead of component Created 6 years 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.h
diff --git a/chrome/browser/webdata/web_data_service_factory.h b/chrome/browser/webdata/web_data_service_factory.h
index fd6d97545804506845bdb4e5cdba88d7853f2dd2..9dfefcb4d9d4d80a1b59888e4dc9aed65a75bd15 100644
--- a/chrome/browser/webdata/web_data_service_factory.h
+++ b/chrome/browser/webdata/web_data_service_factory.h
@@ -7,59 +7,30 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/singleton.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "components/webdata/common/web_database_service.h"
+template <typename T> struct DefaultSingletonTraits;
class KeywordWebDataService;
class TokenWebData;
+class WebDataServiceWrapper;
#if defined(OS_WIN)
class PasswordWebDataService;
#endif
namespace autofill {
+class AutofillWebDataBackend;
class AutofillWebDataService;
} // namespace autofill
-// A wrapper of WebDataService so that we can use it as a profile keyed service.
-class WebDataServiceWrapper : public KeyedService {
- public:
- explicit WebDataServiceWrapper(Profile* profile);
-
- // For testing.
- WebDataServiceWrapper();
-
- ~WebDataServiceWrapper() override;
-
- // KeyedService:
- void Shutdown() override;
-
- virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData();
-
- virtual scoped_refptr<KeywordWebDataService> GetKeywordWebData();
-
- virtual scoped_refptr<TokenWebData> GetTokenWebData();
-
-#if defined(OS_WIN)
- virtual scoped_refptr<PasswordWebDataService> GetPasswordWebData();
-#endif
-
- private:
- scoped_refptr<WebDatabaseService> web_database_;
-
- scoped_refptr<autofill::AutofillWebDataService> autofill_web_data_;
- scoped_refptr<KeywordWebDataService> keyword_web_data_;
- scoped_refptr<TokenWebData> token_web_data_;
-
-#if defined(OS_WIN)
- scoped_refptr<PasswordWebDataService> password_web_data_;
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper);
-};
+// Initialize syncable services on database thread.
+// (visible for testing)
+void InitSyncableServicesOnDBThread(
+ scoped_refptr<autofill::AutofillWebDataService> autofill_web_data,
+ const base::FilePath& profile_path,
+ const std::string& app_locale,
+ autofill::AutofillWebDataBackend* autofill_backend);
// Singleton that owns all WebDataServiceWrappers and associates them with
// Profiles.
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/browser/webdata/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698