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

Unified Diff: components/sync_driver/device_info_data_type_controller.cc

Issue 672863002: Sync: fix crash in DeviceInfoDataTypeController::Subscription destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: components/sync_driver/device_info_data_type_controller.cc
diff --git a/components/sync_driver/device_info_data_type_controller.cc b/components/sync_driver/device_info_data_type_controller.cc
index 592633dc815a2cd93c7c573cf69ce0ee9c089d8d..f1e7499b318dfa9f4dd23906474c3f7e94ddcff7 100644
--- a/components/sync_driver/device_info_data_type_controller.cc
+++ b/components/sync_driver/device_info_data_type_controller.cc
@@ -37,6 +37,10 @@ bool DeviceInfoDataTypeController::StartModels() {
return false;
}
+void DeviceInfoDataTypeController::StopModels() {
+ subscription_.reset();
+}
+
void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() {
DCHECK_EQ(state_, MODEL_STARTING);
DCHECK(local_device_info_provider_->GetLocalDeviceInfo());

Powered by Google App Engine
This is Rietveld 408576698