| Index: chrome/browser/chromeos/settings/device_settings_service.cc
|
| diff --git a/chrome/browser/chromeos/settings/device_settings_service.cc b/chrome/browser/chromeos/settings/device_settings_service.cc
|
| index c9b71edb4b7a7df32a46c47b137dee2f6dcb8d3e..c39e0d0389e584180e796fd89c4f2c24787432a4 100644
|
| --- a/chrome/browser/chromeos/settings/device_settings_service.cc
|
| +++ b/chrome/browser/chromeos/settings/device_settings_service.cc
|
| @@ -242,13 +242,10 @@ void DeviceSettingsService::HandleCompletedOperation(
|
| }
|
| SetOwnershipStatus(ownership_status);
|
|
|
| + bool new_owner_key = false;
|
| if (owner_key_.get() != new_key.get()) {
|
| owner_key_ = new_key;
|
| - FOR_EACH_OBSERVER(Observer, observers_, OwnershipStatusChanged());
|
| - content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED,
|
| - content::Source<DeviceSettingsService>(this),
|
| - content::NotificationService::NoDetails());
|
| + new_owner_key = true;
|
| }
|
|
|
| if (status == STORE_SUCCESS) {
|
| @@ -258,6 +255,14 @@ void DeviceSettingsService::HandleCompletedOperation(
|
| LOG(ERROR) << "Session manager operation failed: " << status;
|
| }
|
|
|
| + if (new_owner_key) {
|
| + FOR_EACH_OBSERVER(Observer, observers_, OwnershipStatusChanged());
|
| + content::NotificationService::current()->Notify(
|
| + chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED,
|
| + content::Source<DeviceSettingsService>(this),
|
| + content::NotificationService::NoDetails());
|
| + }
|
| +
|
| FOR_EACH_OBSERVER(Observer, observers_, DeviceSettingsUpdated());
|
|
|
| std::vector<OwnershipStatusCallback> callbacks;
|
|
|