OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLOUD_POLICY_INVALIDATOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return invalidations_enabled_; | 89 return invalidations_enabled_; |
90 } | 90 } |
91 | 91 |
92 // The highest invalidation version that was handled already. | 92 // The highest invalidation version that was handled already. |
93 int64 highest_handled_invalidation_version() const { | 93 int64 highest_handled_invalidation_version() const { |
94 return highest_handled_invalidation_version_; | 94 return highest_handled_invalidation_version_; |
95 } | 95 } |
96 | 96 |
97 // syncer::InvalidationHandler: | 97 // syncer::InvalidationHandler: |
98 virtual void OnInvalidatorStateChange( | 98 virtual void OnInvalidatorStateChange( |
99 syncer::InvalidatorState state) OVERRIDE; | 99 syncer::InvalidatorState state) override; |
100 virtual void OnIncomingInvalidation( | 100 virtual void OnIncomingInvalidation( |
101 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 101 const syncer::ObjectIdInvalidationMap& invalidation_map) override; |
102 virtual std::string GetOwnerName() const OVERRIDE; | 102 virtual std::string GetOwnerName() const override; |
103 | 103 |
104 // CloudPolicyCore::Observer: | 104 // CloudPolicyCore::Observer: |
105 virtual void OnCoreConnected(CloudPolicyCore* core) OVERRIDE; | 105 virtual void OnCoreConnected(CloudPolicyCore* core) override; |
106 virtual void OnRefreshSchedulerStarted(CloudPolicyCore* core) OVERRIDE; | 106 virtual void OnRefreshSchedulerStarted(CloudPolicyCore* core) override; |
107 virtual void OnCoreDisconnecting(CloudPolicyCore* core) OVERRIDE; | 107 virtual void OnCoreDisconnecting(CloudPolicyCore* core) override; |
108 | 108 |
109 // CloudPolicyStore::Observer: | 109 // CloudPolicyStore::Observer: |
110 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; | 110 virtual void OnStoreLoaded(CloudPolicyStore* store) override; |
111 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; | 111 virtual void OnStoreError(CloudPolicyStore* store) override; |
112 | 112 |
113 private: | 113 private: |
114 // Handle an invalidation to the policy. | 114 // Handle an invalidation to the policy. |
115 void HandleInvalidation(const syncer::Invalidation& invalidation); | 115 void HandleInvalidation(const syncer::Invalidation& invalidation); |
116 | 116 |
117 // Update object registration with the invalidation service based on the | 117 // Update object registration with the invalidation service based on the |
118 // given policy data. | 118 // given policy data. |
119 void UpdateRegistration(const enterprise_management::PolicyData* policy); | 119 void UpdateRegistration(const enterprise_management::PolicyData* policy); |
120 | 120 |
121 // Registers the given object with the invalidation service. | 121 // Registers the given object with the invalidation service. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 // WeakPtrFactory used to create callbacks to this object. | 236 // WeakPtrFactory used to create callbacks to this object. |
237 base::WeakPtrFactory<CloudPolicyInvalidator> weak_factory_; | 237 base::WeakPtrFactory<CloudPolicyInvalidator> weak_factory_; |
238 | 238 |
239 DISALLOW_COPY_AND_ASSIGN(CloudPolicyInvalidator); | 239 DISALLOW_COPY_AND_ASSIGN(CloudPolicyInvalidator); |
240 }; | 240 }; |
241 | 241 |
242 } // namespace policy | 242 } // namespace policy |
243 | 243 |
244 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ | 244 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ |
OLD | NEW |