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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc

Issue 2907493002: ChromeOS: Per-user time zone: refactor tests first. (Closed)
Patch Set: Update after review. Created 3 years, 7 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: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
index f069335c56010ed551f99f96963be27c1692e347..5471086376976044fc9b5d4db12cf9e287323644 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
@@ -40,7 +40,8 @@ DeviceCloudPolicyStoreChromeOS::DeviceCloudPolicyStoreChromeOS(
}
DeviceCloudPolicyStoreChromeOS::~DeviceCloudPolicyStoreChromeOS() {
- device_settings_service_->RemoveObserver(this);
+ if (device_settings_service_)
+ device_settings_service_->RemoveObserver(this);
}
void DeviceCloudPolicyStoreChromeOS::Store(
@@ -107,6 +108,7 @@ void DeviceCloudPolicyStoreChromeOS::DeviceSettingsUpdated() {
}
void DeviceCloudPolicyStoreChromeOS::OnDeviceSettingsServiceShutdown() {
+ device_settings_service_->RemoveObserver(this);
device_settings_service_ = nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698