Chromium Code Reviews| Index: chrome/browser/sync/profile_sync_service.cc |
| diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc |
| index 3e81f9f4d293a787709f3584c1e0ca3f3d5dabc1..c725c94b84ed90784b03ca99bf08ce44ca3c9652 100644 |
| --- a/chrome/browser/sync/profile_sync_service.cc |
| +++ b/chrome/browser/sync/profile_sync_service.cc |
| @@ -464,6 +464,10 @@ void ProfileSyncService::ShutdownImpl(bool sync_disabled) { |
| this, |
| chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, |
| content::Source<DataTypeManager>(data_type_manager_.get())); |
| + registrar_.Remove( |
| + this, |
| + chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED, |
| + content::Source<DataTypeManager>(data_type_manager_.get())); |
| data_type_manager_.reset(); |
| } |
| @@ -1131,6 +1135,7 @@ void ProfileSyncService::OnUserChoseDatatypes(bool sync_everything, |
| failed_datatypes_handler_.OnUserChoseDatatypes(); |
| ChangePreferredDataTypes(chosen_types); |
| AcknowledgeSyncedTypes(); |
| + NotifyObservers(); |
|
Nicolas Zea
2012/05/10 20:35:08
was the consensus to put this in OnUserChoseDataTy
Andrew T Wilson (Slow)
2012/05/11 23:58:40
I think this is the right place for it - I can con
|
| } |
| void ProfileSyncService::ChangePreferredDataTypes( |
| @@ -1196,6 +1201,9 @@ void ProfileSyncService::ConfigureDataTypeManager() { |
| registrar_.Add(this, |
| chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, |
| content::Source<DataTypeManager>(data_type_manager_.get())); |
| + registrar_.Add(this, |
| + chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED, |
| + content::Source<DataTypeManager>(data_type_manager_.get())); |
| // We create the migrator at the same time. |
| migrator_.reset( |
| @@ -1212,6 +1220,7 @@ void ProfileSyncService::ConfigureDataTypeManager() { |
| // until we receive an OnPassphraseAccepted (which triggers a configure). |
| DVLOG(1) << "ProfileSyncService::ConfigureDataTypeManager bailing out " |
| << "because a passphrase required"; |
| + NotifyObservers(); |
| return; |
| } |
| sync_api::ConfigureReason reason = sync_api::CONFIGURE_REASON_UNKNOWN; |
| @@ -1393,12 +1402,13 @@ void ProfileSyncService::Observe(int type, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) { |
| switch (type) { |
| - case chrome::NOTIFICATION_SYNC_CONFIGURE_START: { |
| + case chrome::NOTIFICATION_SYNC_CONFIGURE_START: |
| + case chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED: |
| NotifyObservers(); |
| - // TODO(sync): Maybe toast? |
| + // TODO(sync): Maybe toast?? |
|
Nicolas Zea
2012/05/10 20:35:08
?
|
| break; |
| - } |
| case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE: { |
| + DLOG(ERROR) << "DONE"; |
|
Nicolas Zea
2012/05/10 20:35:08
remove
|
| // We should have cleared our cached passphrase before we get here (in |
| // OnBackendInitialized()). |
| DCHECK(cached_passphrase_.empty()); |