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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.cc

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: once more? Created 8 years, 5 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/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;

Powered by Google App Engine
This is Rietveld 408576698