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

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: Fix browsertest failure 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..11c419bd1850d8255b285d4afdce67e4f11b6636 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -44,6 +44,7 @@
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_session_runner.h"
#include "components/arc/arc_util.h"
+#include "components/policy/core/common/policy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/sync_preferences/pref_service_syncable.h"
@@ -113,6 +114,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(policy::policy_prefs::kActiveDirectoryPlayUserId,
+ std::string());
}
// static
@@ -186,6 +191,11 @@ void ArcSessionManager::RemoveArcData() {
}
VLOG(1) << "Starting ARC data removal";
+
+ // Remove Play user ID for Active Directory managed devices.
+ profile_->GetPrefs()->SetString(
+ policy::policy_prefs::kActiveDirectoryPlayUserId, std::string());
+
SetState(State::REMOVING_DATA_DIR);
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData(
cryptohome::Identification(

Powered by Google App Engine
This is Rietveld 408576698