Fix use-after-free in HDDDTC shutdown
commit40dbafab4cfef214d7a4bae22c8d698936ed6f5f
authorzea <zea@chromium.org>
Tue, 9 Sep 2014 00:54:35 +0000 (8 17:54 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Sep 2014 00:57:39 +0000 (9 00:57 +0000)
treecf3cd0eed33249fe863452aa886799c19b9eb687
parent584002d1c89e79223f8bf5f973294b96bdfa15ab
Fix use-after-free in HDDDTC shutdown

We were trying to unregister the HistoryDeleteDirective DTC at shutdown, but
the DTC shutdown happens as part of the ProfileSyncService shutdown, and is
destroyed after the observers_ object is destroyed. As such, there's no need
to remove the observer.

This patch also unreverts 6513171d7473b9eb60e1bf16369cf893daa33a07
Original codereview at https://codereview.chromium.org/534733002

BUG=409965 368834

Review URL: https://codereview.chromium.org/535683002

Cr-Commit-Position: refs/heads/master@{#293824}
22 files changed:
chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc [new file with mode: 0644]
chrome/browser/sync/glue/history_delete_directives_data_type_controller.h [new file with mode: 0644]
chrome/browser/sync/profile_sync_components_factory.h
chrome/browser/sync/profile_sync_components_factory_impl.cc
chrome/browser/sync/profile_sync_components_factory_impl.h
chrome/browser/sync/profile_sync_components_factory_mock.h
chrome/browser/sync/profile_sync_service.cc
chrome/browser/sync/profile_sync_service_autofill_unittest.cc
chrome/browser/sync/profile_sync_service_startup_unittest.cc
chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
chrome/browser/sync/profile_sync_service_unittest.cc
chrome/browser/sync/test/integration/sync_errors_test.cc
chrome/browser/sync/test_profile_sync_service.h
chrome/chrome_browser.gypi
components/sync_driver/data_type_manager.h
components/sync_driver/data_type_manager_impl.cc
components/sync_driver/data_type_manager_impl.h
components/sync_driver/data_type_manager_impl_unittest.cc
components/sync_driver/data_type_manager_mock.h
components/sync_driver/data_type_status_table.cc
components/sync_driver/data_type_status_table.h
components/sync_driver/fake_data_type_controller.cc