Index: chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h |
diff --git a/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h b/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h |
index 2ddccecfc17be367d3366eaabfca857e9d519f26..88f7bbebe102d5b5040724aaed73bd9690118d79 100644 |
--- a/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h |
+++ b/chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h |
@@ -29,6 +29,17 @@ class StubEnterpriseInstallAttributes : public EnterpriseInstallAttributes { |
DISALLOW_COPY_AND_ASSIGN(StubEnterpriseInstallAttributes); |
}; |
+// Helper class to set enterprise install attributes in the scope of a test. |
+// Note: The install attributes cannot be removed once set, so the instance sets |
+// the attributes on construction, but does not remove them on destruction. |
+class ScopedStubEnterpriseInstallAttributes { |
+ public: |
+ ScopedStubEnterpriseInstallAttributes(const std::string& domain, |
+ const std::string& registration_user, |
+ const std::string& device_id, |
+ DeviceMode mode); |
+}; |
+ |
} // namespace policy |
#endif // CHROME_BROWSER_CHROMEOS_POLICY_STUB_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |