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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 1851004: Adding sync support for Passwords (Closed)
Patch Set: Ready for checkin Created 10 years, 7 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/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/profile_sync_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 5ae93667ad7e36d7807bb23a895923e74a9b0af2..a058244332b42727eabb2a28802c701122711466 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/sync/glue/history_model_worker.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/http_bridge.h"
+#include "chrome/browser/sync/glue/password_model_worker.h"
#include "chrome/browser/sync/sessions/session_state.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
@@ -84,10 +85,13 @@ void SyncBackendHost::Initialize(
// need to update routing_info_.
registrar_.workers[GROUP_DB] = new DatabaseModelWorker();
registrar_.workers[GROUP_HISTORY] =
- new HistoryModelWorker(
- profile_->GetHistoryService(Profile::IMPLICIT_ACCESS));
+ new HistoryModelWorker(
+ profile_->GetHistoryService(Profile::IMPLICIT_ACCESS));
registrar_.workers[GROUP_UI] = new UIModelWorker(frontend_loop_);
registrar_.workers[GROUP_PASSIVE] = new ModelSafeWorker();
+ registrar_.workers[GROUP_PASSWORD] =
+ new PasswordModelWorker(
+ profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS));
// Any datatypes that we want the syncer to pull down must
// be in the routing_info map. We set them to group passive, meaning that
@@ -153,10 +157,12 @@ void SyncBackendHost::Shutdown(bool sync_disabled) {
registrar_.workers[GROUP_HISTORY] = NULL;
registrar_.workers[GROUP_UI] = NULL;
registrar_.workers[GROUP_PASSIVE] = NULL;
+ registrar_.workers[GROUP_PASSWORD] = NULL;
registrar_.workers.erase(GROUP_DB);
registrar_.workers.erase(GROUP_HISTORY);
registrar_.workers.erase(GROUP_UI);
registrar_.workers.erase(GROUP_PASSIVE);
+ registrar_.workers.erase(GROUP_PASSWORD);
frontend_ = NULL;
core_ = NULL; // Releases reference to core_.
}
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/profile_sync_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698