| Index: chrome/browser/chromeos/policy/stub_enterprise_install_attributes.cc
|
| diff --git a/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.cc b/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.cc
|
| index 5d67f7c0b61e465fb803f77153f6c246334fa3e5..7f56557712ab04ee7299cd5379c602303f4050a9 100644
|
| --- a/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.cc
|
| +++ b/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <string>
|
|
|
| +#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
|
| #include "components/policy/core/common/cloud/cloud_policy_constants.h"
|
|
|
| namespace policy {
|
| @@ -32,4 +33,23 @@ void StubEnterpriseInstallAttributes::SetMode(DeviceMode mode) {
|
| registration_mode_ = mode;
|
| }
|
|
|
| +ScopedStubEnterpriseInstallAttributes::ScopedStubEnterpriseInstallAttributes(
|
| + const std::string& domain,
|
| + const std::string& registration_user,
|
| + const std::string& device_id,
|
| + DeviceMode mode) {
|
| + StubEnterpriseInstallAttributes* attributes =
|
| + new StubEnterpriseInstallAttributes();
|
| + attributes->SetDomain(domain);
|
| + attributes->SetRegistrationUser(registration_user);
|
| + attributes->SetDeviceId(device_id);
|
| + attributes->SetMode(mode);
|
| + BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting(attributes);
|
| +}
|
| +
|
| +ScopedStubEnterpriseInstallAttributes::
|
| +~ScopedStubEnterpriseInstallAttributes() {
|
| + BrowserPolicyConnectorChromeOS::RemoveInstallAttributesForTesting();
|
| +}
|
| +
|
| } // namespace policy
|
|
|