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

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

Issue 2701753004: Don't let creating Google accounts on the Active Directory devices. (Closed)
Patch Set: Update after review 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/settings/install_attributes.cc
diff --git a/chrome/browser/chromeos/settings/install_attributes.cc b/chrome/browser/chromeos/settings/install_attributes.cc
index 6de49adf71959784cb221052901907bab2c55a81..710cb2e9b9a9ad780498cb6ad3750517784f5e7b 100644
--- a/chrome/browser/chromeos/settings/install_attributes.cc
+++ b/chrome/browser/chromeos/settings/install_attributes.cc
@@ -71,6 +71,28 @@ InstallAttributes::GetEnterpriseOwnedInstallAttributesBlobForTesting(
return install_attrs_proto.SerializeAsString();
}
+// static
+std::string InstallAttributes::
+ GetActiveDirectoryEnterpriseOwnedInstallAttributesBlobForTesting(
+ const std::string& realm) {
+ cryptohome::SerializedInstallAttributes install_attrs_proto;
+ cryptohome::SerializedInstallAttributes::Attribute* attribute = nullptr;
+
+ attribute = install_attrs_proto.add_attributes();
+ attribute->set_name(InstallAttributes::kAttrEnterpriseOwned);
+ attribute->set_value("true");
+
+ attribute = install_attrs_proto.add_attributes();
+ attribute->set_name(InstallAttributes::kAttrEnterpriseMode);
+ attribute->set_value(InstallAttributes::kEnterpriseADDeviceMode);
+
+ attribute = install_attrs_proto.add_attributes();
+ attribute->set_name(InstallAttributes::kAttrEnterpriseRealm);
+ attribute->set_value(realm);
+
+ return install_attrs_proto.SerializeAsString();
+}
+
InstallAttributes::InstallAttributes(CryptohomeClient* cryptohome_client)
: cryptohome_client_(cryptohome_client),
weak_ptr_factory_(this) {
« no previous file with comments | « chrome/browser/chromeos/settings/install_attributes.h ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698