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

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: 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..a958ff4984cadd45ec7152822b599e3557e52043 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,10 @@ void AutofillChangeProcessor::CommitChangesFromSyncModel() {
return;
}
- PostOptimisticRefreshTask();
+ WebDataService* web_data_service =
+ profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
+ if (web_data_service)
+ web_data_service->NotifyOfMultipleAutofillChanges();
StartObserving();
}

Powered by Google App Engine
This is Rietveld 408576698