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..210ca16b8b822f8983ec952c5b141cd2c996a00a 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,18 @@ 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); |
Mattias Nissler (ping if slow)
2014/04/24 07:21:57
Hm, the whole SetInstallAttributesForTesting seems
Steve Condie
2014/04/24 18:14:28
Good call, done. I was thinking that resetting g_t
|
+} |
+ |
} // namespace policy |