Chromium Code Reviews| 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..9eaf57acc4f0012553a7b4df3aa62c16097ad16c 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" |
| @@ -25,8 +25,11 @@ |
| #include "chrome/browser/sync/protocol/autofill_specifics.pb.h" |
| #include "chrome/browser/webdata/autofill_table.h" |
| #include "chrome/browser/webdata/web_database.h" |
| +#include "chrome/common/chrome_notification_types.h" |
| #include "chrome/common/guid.h" |
| #include "content/browser/browser_thread.h" |
| +#include "content/common/notification_service.h" |
| +#include "content/common/notification_source.h" |
|
Ilya Sherman
2011/09/23 03:56:34
nit: I'm not seeing why these header additions are
dhollowa
2011/09/23 16:30:03
Vestigial. Removed.
|
| #include "net/base/escape.h" |
| using base::TimeTicks; |
| @@ -48,16 +51,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 +201,11 @@ bool AutofillModelAssociator::AssociateModels(SyncError* error) { |
| return false; |
| } |
| - 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; |
| } |