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

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

Issue 7967024: Profile shouldn't own PersonalDataManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/sync/glue/autofill_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 761f1ec322feaad08a595197a99b7fa44b9843d2..ba545531e02ea69d93268406fd585e821f343569 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -7,6 +7,7 @@
#include "base/metrics/histogram.h"
#include "base/task.h"
#include "chrome/browser/autofill/personal_data_manager.h"
+#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -35,7 +36,7 @@ bool AutofillDataTypeController::StartModels() {
// Waiting for the personal data is subtle: we do this as the PDM resets
// its cache of unique IDs once it gets loaded. If we were to proceed with
// association, the local ids in the mappings would wind up colliding.
- personal_data_ = profile()->GetPersonalDataManager();
+ personal_data_ = PersonalDataManagerFactory::GetForProfile(profile());
if (!personal_data_->IsDataLoaded()) {
personal_data_->SetObserver(this);
return false;
@@ -96,7 +97,6 @@ void AutofillDataTypeController::CreateSyncComponents() {
CreateAutofillSyncComponents(
profile_sync_service(),
web_data_service_->GetDatabase(),
- personal_data_,
this);
set_model_associator(sync_components.model_associator);
set_change_processor(sync_components.change_processor);

Powered by Google App Engine
This is Rietveld 408576698