Chromium Code Reviews| Index: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc |
| diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc |
| index 1b5f55e61f0d200bc85c58a1041b26eac3daa30f..1e92e82307f5bd2e0ef60bf4d157b4258ff667a9 100644 |
| --- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc |
| +++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc |
| @@ -332,6 +332,8 @@ void OwnerSettingsServiceChromeOS::Observe( |
| Profile* profile = content::Source<Profile>(source).ptr(); |
| if (profile != profile_) { |
| + LOG(ERROR) << "===== profile = " << profile; |
|
ygorshenin1
2015/01/12 10:08:55
Could you please replace these two error messages
davidyu
2015/01/13 05:43:52
I'll just remove the debug message that I forgot t
|
| + LOG(ERROR) << "===== profile_ = " << profile_; |
| NOTREACHED(); |
| return; |
| } |
| @@ -719,8 +721,16 @@ void OwnerSettingsServiceChromeOS::StorePendingChanges() { |
| if (has_pending_management_settings_) { |
| policy::SetManagementMode(*policy, |
| pending_management_settings_.management_mode); |
| - policy->set_request_token(pending_management_settings_.request_token); |
| - policy->set_device_id(pending_management_settings_.device_id); |
| + |
| + if (pending_management_settings_.request_token.empty()) |
| + policy->clear_request_token(); |
| + else |
| + policy->set_request_token(pending_management_settings_.request_token); |
| + |
| + if (pending_management_settings_.device_id.empty()) |
| + policy->clear_device_id(); |
| + else |
| + policy->set_device_id(pending_management_settings_.device_id); |
| } |
| has_pending_management_settings_ = false; |