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

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

Issue 7967024: Profile shouldn't own PersonalDataManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addresses isherman #11 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_model_associator.cc
diff --git a/chrome/browser/sync/glue/autofill_model_associator.cc b/chrome/browser/sync/glue/autofill_model_associator.cc
index fb45817e5df7f77d2894fe83b9836a98644d816e..464d940f229de46b506d9806135ec0fe2b7a8169 100644
--- a/chrome/browser/sync/glue/autofill_model_associator.cc
+++ b/chrome/browser/sync/glue/autofill_model_associator.cc
@@ -8,6 +8,7 @@
#include <vector>
#include "base/location.h"
+#include "base/memory/scoped_vector.h"
#include "base/string_number_conversions.h"
#include "base/task.h"
#include "base/time.h"
@@ -16,7 +17,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/glue/autofill_change_processor.h"
-#include "chrome/browser/sync/glue/do_optimistic_refresh_task.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/internal_api/write_node.h"
@@ -48,16 +48,16 @@ struct AutofillModelAssociator::DataBundle {
AutofillModelAssociator::AutofillModelAssociator(
ProfileSyncService* sync_service,
WebDatabase* web_database,
- PersonalDataManager* personal_data)
+ Profile* profile)
: sync_service_(sync_service),
web_database_(web_database),
- personal_data_(personal_data),
+ profile_(profile),
autofill_node_id_(sync_api::kInvalidId),
abort_association_pending_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(sync_service_);
DCHECK(web_database_);
- DCHECK(personal_data_);
+ DCHECK(profile_);
}
AutofillModelAssociator::~AutofillModelAssociator() {
@@ -198,8 +198,8 @@ bool AutofillModelAssociator::AssociateModels(SyncError* error) {
return false;
}
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- new DoOptimisticRefreshForAutofill(personal_data_));
+ WebDataService::NotifyOfMultipleAutofillChanges(profile_);
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698