Index: chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
diff --git a/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc b/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
index 59e840165995fc26e73017450334e125208820aa..2e25f8496953a17bad8664dadae2ac06d691cc6b 100644 |
--- a/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
+++ b/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
@@ -31,13 +31,14 @@ DevicePolicyCrosTestHelper::DevicePolicyCrosTestHelper() {} |
DevicePolicyCrosTestHelper::~DevicePolicyCrosTestHelper() {} |
-void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwned() { |
+// static |
+void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwnedBy( |
+ const std::string& user_name) { |
OverridePaths(); |
const std::string install_attrs_blob( |
EnterpriseInstallAttributes:: |
- GetEnterpriseOwnedInstallAttributesBlobForTesting( |
- device_policy_.policy_data().username())); |
+ GetEnterpriseOwnedInstallAttributesBlobForTesting(user_name)); |
base::FilePath install_attrs_file; |
ASSERT_TRUE( |
@@ -48,6 +49,10 @@ void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwned() { |
install_attrs_blob.size())); |
} |
+void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwned() { |
+ MarkAsEnterpriseOwnedBy(device_policy_.policy_data().username()); |
+} |
+ |
void DevicePolicyCrosTestHelper::InstallOwnerKey() { |
OverridePaths(); |
@@ -63,6 +68,7 @@ void DevicePolicyCrosTestHelper::InstallOwnerKey() { |
static_cast<int>(owner_key_bits.size())); |
} |
+// static |
void DevicePolicyCrosTestHelper::OverridePaths() { |
// This is usually done by ChromeBrowserMainChromeOS, but some tests |
// use the overridden paths before ChromeBrowserMain starts. Make sure that |