Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_store_base.h

Issue 19733003: Implement cloud policy invalidations using the invalidation service framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/policy/cloud/cloud_policy_store.h" 13 #include "chrome/browser/policy/cloud/cloud_policy_store.h"
14 14
15 namespace policy { 15 namespace policy {
16 16
17 // Base class that implements common cross-platform UserCloudPolicyStore 17 // Base class that implements common cross-platform UserCloudPolicyStore
18 // functionality. 18 // functionality.
19 class UserCloudPolicyStoreBase : public CloudPolicyStore { 19 class UserCloudPolicyStoreBase : public CloudPolicyStore {
20 public: 20 public:
21 UserCloudPolicyStoreBase(); 21 UserCloudPolicyStoreBase();
22 virtual ~UserCloudPolicyStoreBase(); 22 virtual ~UserCloudPolicyStoreBase();
23 23
24 protected: 24 protected:
25 // Creates a validator configured to validate a user policy. The caller owns 25 // Creates a validator configured to validate a user policy. The caller owns
26 // the resulting object until StartValidation() is invoked. 26 // the resulting object until StartValidation() is invoked.
27 scoped_ptr<UserCloudPolicyValidator> CreateValidator( 27 scoped_ptr<UserCloudPolicyValidator> CreateValidator(
28 scoped_ptr<enterprise_management::PolicyFetchResponse> policy); 28 scoped_ptr<enterprise_management::PolicyFetchResponse> policy);
29 29
30 // Sets |policy_data| and |payload| as the active policy. 30 // Sets |policy_data| and |payload| with hash |policy_hash_value| as the
31 // active policy.
31 void InstallPolicy( 32 void InstallPolicy(
32 scoped_ptr<enterprise_management::PolicyData> policy_data, 33 scoped_ptr<enterprise_management::PolicyData> policy_data,
33 scoped_ptr<enterprise_management::CloudPolicySettings> payload); 34 scoped_ptr<enterprise_management::CloudPolicySettings> payload,
35 uint32 policy_hash_value);
34 36
35 private: 37 private:
36 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreBase); 38 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreBase);
37 }; 39 };
38 40
39 } // namespace policy 41 } // namespace policy
40 42
41 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_ 43 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_STORE_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698