| Index: chrome/browser/sync/glue/autofill_data_type_controller.cc
|
| diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
|
| index 31ad3ae107726d1e4718e255a0531e84c6efd0d5..b614b09292fc6a0d0a5b7c6d20942a4882f1ed74 100644
|
| --- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
|
| +++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
|
| @@ -26,6 +26,30 @@ AutofillDataTypeController::AutofillDataTypeController(
|
| profile_sync_factory, profile, sync_service) {
|
| }
|
|
|
| +syncable::ModelType AutofillDataTypeController::type() const {
|
| + return syncable::AUTOFILL;
|
| +}
|
| +
|
| +browser_sync::ModelSafeGroup AutofillDataTypeController::model_safe_group()
|
| + const {
|
| + return browser_sync::GROUP_DB;
|
| +}
|
| +
|
| +void AutofillDataTypeController::Observe(
|
| + int notification_type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_EQ(chrome::NOTIFICATION_WEB_DATABASE_LOADED, notification_type);
|
| + DCHECK_EQ(MODEL_STARTING, state());
|
| + notification_registrar_.RemoveAll();
|
| + set_state(ASSOCIATING);
|
| + if (!StartAssociationAsync()) {
|
| + SyncError error(FROM_HERE, "Failed to post association task.", type());
|
| + StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
|
| + }
|
| +}
|
| +
|
| AutofillDataTypeController::~AutofillDataTypeController() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| }
|
| @@ -52,21 +76,6 @@ bool AutofillDataTypeController::StartModels() {
|
| }
|
| }
|
|
|
| -void AutofillDataTypeController::Observe(
|
| - int notification_type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - DCHECK_EQ(chrome::NOTIFICATION_WEB_DATABASE_LOADED, notification_type);
|
| - DCHECK_EQ(MODEL_STARTING, state());
|
| - notification_registrar_.RemoveAll();
|
| - set_state(ASSOCIATING);
|
| - if (!StartAssociationAsync()) {
|
| - SyncError error(FROM_HERE, "Failed to post association task.", type());
|
| - StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
|
| - }
|
| -}
|
| -
|
| void AutofillDataTypeController::StopModels() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED);
|
| @@ -74,13 +83,4 @@ void AutofillDataTypeController::StopModels() {
|
| notification_registrar_.RemoveAll();
|
| }
|
|
|
| -syncable::ModelType AutofillDataTypeController::type() const {
|
| - return syncable::AUTOFILL;
|
| -}
|
| -
|
| -browser_sync::ModelSafeGroup AutofillDataTypeController::model_safe_group()
|
| - const {
|
| - return browser_sync::GROUP_DB;
|
| -}
|
| -
|
| } // namespace browser_sync
|
|
|