summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc')
-rw-r--r--chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc13
1 files changed, 9 insertions, 4 deletions
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 59e8401..8e78071 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