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

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: Addressing tfarina #2 and isherman #3. 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..a2f6718c6d9bb43a81a7cd9f73fa7cf57efc3bf5 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,11 @@ bool AutofillModelAssociator::AssociateModels(SyncError* error) {
return false;
}
lipalani1 2011/09/23 18:08:30 Can you make this a function, just like postoptimi
dhollowa 2011/09/23 20:09:02 Yes, done. I've moved it to WebDataService since
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- new DoOptimisticRefreshForAutofill(personal_data_));
+ WebDataService* web_data_service =
+ profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
+ if (web_data_service)
+ web_data_service->NotifyOfMultipleAutofillChanges();
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698