Index: chrome/browser/policy/user_cloud_policy_store_base.h |
diff --git a/chrome/browser/policy/user_cloud_policy_store_base.h b/chrome/browser/policy/user_cloud_policy_store_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cd657bb86e69ac2b237b4ce578d63d634a3c02f4 |
--- /dev/null |
+++ b/chrome/browser/policy/user_cloud_policy_store_base.h |
@@ -0,0 +1,44 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ |
+#define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
Mattias Nissler (ping if slow)
2012/08/03 12:19:08
needed?
Andrew T Wilson (Slow)
2012/08/04 00:54:41
Done.
|
+#include "base/file_path.h" |
Mattias Nissler (ping if slow)
2012/08/03 12:19:08
needed?
Andrew T Wilson (Slow)
2012/08/04 00:54:41
Done.
|
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/policy/cloud_policy_store.h" |
+ |
+namespace policy { |
+ |
+// Base class that implements common cross-platform UserCloudPolicyStore |
+// functionality. |
+class UserCloudPolicyStoreBase : public CloudPolicyStore { |
+ public: |
+ UserCloudPolicyStoreBase(); |
+ virtual ~UserCloudPolicyStoreBase(); |
+ |
+ protected: |
+ // Creates a validator configured to validate a user policy. The caller owns |
+ // the resulting object until StartValidation() is invoked. |
+ scoped_ptr<UserCloudPolicyValidator> CreateValidator( |
+ scoped_ptr<enterprise_management::PolicyFetchResponse> policy, |
+ const UserCloudPolicyValidator::CompletionCallback& callback); |
+ |
+ // Sets |policy_data| and |payload| as the active policy. |
+ void InstallPolicy( |
+ scoped_ptr<enterprise_management::PolicyData> policy_data, |
+ scoped_ptr<enterprise_management::CloudPolicySettings> payload); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreBase); |
+}; |
+ |
+} // namespace policy |
+ |
+#endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ |