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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc

Issue 751703003: Implemented consumer management unenrollment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dcpm
Patch Set: Created 6 years 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/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;

Powered by Google App Engine
This is Rietveld 408576698