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

Side by Side Diff: chrome/browser/policy/device_policy_cache.h

Issue 10885015: Implement new-style CloudPolicyStore for Chrome OS device policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix compilation. Created 8 years, 3 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 | Annotate | Revision Log
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_DEVICE_POLICY_CACHE_H_ 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_
6 #define CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ 6 #define CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_
7 7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/chromeos/settings/device_settings_service.h" 13 #include "chrome/browser/chromeos/settings/device_settings_service.h"
10 #include "chrome/browser/policy/cloud_policy_cache_base.h" 14 #include "chrome/browser/policy/cloud_policy_cache_base.h"
11 15
12 namespace policy { 16 namespace policy {
13 17
14 class CloudPolicyDataStore; 18 class CloudPolicyDataStore;
15 class EnterpriseInstallAttributes; 19 class EnterpriseInstallAttributes;
16 class PolicyMap; 20 class PolicyMap;
17 21
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Ensures that CrosSettings has established trust on the reporting prefs and 72 // Ensures that CrosSettings has established trust on the reporting prefs and
69 // publishes the |device_token| loaded from the cache. It's important that we 73 // publishes the |device_token| loaded from the cache. It's important that we
70 // have fully-initialized device settings s.t. device status uploads get the 74 // have fully-initialized device settings s.t. device status uploads get the
71 // correct reporting policy flags. 75 // correct reporting policy flags.
72 void SetTokenAndFlagReady(const std::string& device_token); 76 void SetTokenAndFlagReady(const std::string& device_token);
73 77
74 // Checks whether a policy fetch is pending and sends out a notification if 78 // Checks whether a policy fetch is pending and sends out a notification if
75 // that is the case. 79 // that is the case.
76 void CheckFetchingDone(); 80 void CheckFetchingDone();
77 81
78 void DecodeDevicePolicy(
79 const enterprise_management::ChromeDeviceSettingsProto& policy,
80 PolicyMap* policies);
81
82 // Decode the various groups of policies.
83 static void DecodeLoginPolicies(
84 const enterprise_management::ChromeDeviceSettingsProto& policy,
85 PolicyMap* policies);
86 static void DecodeKioskPolicies(
87 const enterprise_management::ChromeDeviceSettingsProto& policy,
88 PolicyMap* policies,
89 EnterpriseInstallAttributes* install_attributes);
90 static void DecodeNetworkPolicies(
91 const enterprise_management::ChromeDeviceSettingsProto& policy,
92 PolicyMap* policies,
93 EnterpriseInstallAttributes* install_attributes);
94 static void DecodeReportingPolicies(
95 const enterprise_management::ChromeDeviceSettingsProto& policy,
96 PolicyMap* policies);
97 static void DecodeAutoUpdatePolicies(
98 const enterprise_management::ChromeDeviceSettingsProto& policy,
99 PolicyMap* policies);
100 static void DecodeGenericPolicies(
101 const enterprise_management::ChromeDeviceSettingsProto& policy,
102 PolicyMap* policies);
103
104 CloudPolicyDataStore* data_store_; 82 CloudPolicyDataStore* data_store_;
105 EnterpriseInstallAttributes* install_attributes_; 83 EnterpriseInstallAttributes* install_attributes_;
106 84
107 chromeos::DeviceSettingsService* device_settings_service_; 85 chromeos::DeviceSettingsService* device_settings_service_;
108 86
109 base::WeakPtrFactory<DevicePolicyCache> weak_ptr_factory_; 87 base::WeakPtrFactory<DevicePolicyCache> weak_ptr_factory_;
110 88
111 bool policy_fetch_pending_; 89 bool policy_fetch_pending_;
112 90
113 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache); 91 DISALLOW_COPY_AND_ASSIGN(DevicePolicyCache);
114 }; 92 };
115 93
116 } // namespace policy 94 } // namespace policy
117 95
118 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_ 96 #endif // CHROME_BROWSER_POLICY_DEVICE_POLICY_CACHE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_cloud_policy_store_chromeos_unittest.cc ('k') | chrome/browser/policy/device_policy_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698