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

Unified Diff: chrome/browser/sync/glue/autofill_change_processor.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_change_processor.cc
diff --git a/chrome/browser/sync/glue/autofill_change_processor.cc b/chrome/browser/sync/glue/autofill_change_processor.cc
index 54ce987487dda2d26bc78be042162c9421ac6d1f..0b70639fd6415f467216ce31dee7a0ddc23c0e0e 100644
--- a/chrome/browser/sync/glue/autofill_change_processor.cc
+++ b/chrome/browser/sync/glue/autofill_change_processor.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/autofill_model_associator.h"
-#include "chrome/browser/sync/glue/do_optimistic_refresh_task.h"
#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/write_node.h"
@@ -43,17 +42,17 @@ struct AutofillChangeProcessor::AutofillChangeRecord {
AutofillChangeProcessor::AutofillChangeProcessor(
AutofillModelAssociator* model_associator,
WebDatabase* web_database,
- PersonalDataManager* personal_data,
+ Profile* profile,
UnrecoverableErrorHandler* error_handler)
: ChangeProcessor(error_handler),
model_associator_(model_associator),
web_database_(web_database),
- personal_data_(personal_data),
+ profile_(profile),
observing_(false) {
DCHECK(model_associator);
DCHECK(web_database);
+ DCHECK(profile);
DCHECK(error_handler);
- DCHECK(personal_data);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
StartObserving();
}
@@ -88,12 +87,6 @@ void AutofillChangeProcessor::Observe(int type,
ObserveAutofillEntriesChanged(changes, &trans, autofill_root);
}
-void AutofillChangeProcessor::PostOptimisticRefreshTask() {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- new DoOptimisticRefreshForAutofill(
- personal_data_));
-}
-
void AutofillChangeProcessor::ObserveAutofillEntriesChanged(
AutofillChangeList* changes, sync_api::WriteTransaction* trans,
const sync_api::ReadNode& autofill_root) {
@@ -302,7 +295,7 @@ void AutofillChangeProcessor::CommitChangesFromSyncModel() {
return;
}
- PostOptimisticRefreshTask();
+ WebDataService::NotifyOfMultipleAutofillChanges(profile_);
StartObserving();
}
« no previous file with comments | « chrome/browser/sync/glue/autofill_change_processor.h ('k') | chrome/browser/sync/glue/autofill_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698