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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2704113003: Save Play user id when ARC user gets a Managed Google Play account (Closed)
Patch Set: Move pref from policy_pref_names to chrome/common/pref_names Created 3 years, 10 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/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index 4e4ec241d8ecce91df78072dc59b1317ab96673c..4bd3da81e5a3166b754663015fb7a88e2a2ddd6b 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -113,6 +113,10 @@ void ArcSessionManager::RegisterProfilePrefs(
// from a previous managed state to the unmanaged.
registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, false);
registry->RegisterBooleanPref(prefs::kArcLocationServiceEnabled, false);
+ // This is used to delete the Play user ID if ARC is disabled for an
+ // AD-managed device.
+ registry->RegisterStringPref(prefs::kArcActiveDirectoryPlayUserId,
+ std::string());
achuithb 2017/03/02 14:41:01 nit: "" is more concise
}
// static
@@ -186,6 +190,11 @@ void ArcSessionManager::RemoveArcData() {
}
VLOG(1) << "Starting ARC data removal";
+
+ // Remove Play user ID for Active Directory managed devices.
+ profile_->GetPrefs()->SetString(prefs::kArcActiveDirectoryPlayUserId,
+ std::string());
+
SetState(State::REMOVING_DATA_DIR);
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData(
cryptohome::Identification(

Powered by Google App Engine
This is Rietveld 408576698