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..8e780717fee5ab43bfd9a34fb1bb505fa80e35a2 100644 |
--- a/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
+++ b/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc |
@@ -4,7 +4,6 @@ |
#include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
-#include <string> |
#include <vector> |
#include "base/files/file_path.h" |
@@ -31,13 +30,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 +48,10 @@ void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwned() { |
install_attrs_blob.size())); |
} |
+void DevicePolicyCrosTestHelper::MarkAsEnterpriseOwned() { |
+ MarkAsEnterpriseOwnedBy(device_policy_.policy_data().username()); |
+} |
+ |
void DevicePolicyCrosTestHelper::InstallOwnerKey() { |
OverridePaths(); |
@@ -63,6 +67,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 |