| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Whether the invalidator currently has the ability to receive invalidations. | 87 // Whether the invalidator currently has the ability to receive invalidations. |
| 88 bool invalidations_enabled() { | 88 bool invalidations_enabled() { |
| 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 invalidation::InvalidationService* invalidation_service_for_test() const { |
| 98 return invalidation_service_; |
| 99 } |
| 100 |
| 97 // syncer::InvalidationHandler: | 101 // syncer::InvalidationHandler: |
| 98 void OnInvalidatorStateChange(syncer::InvalidatorState state) override; | 102 void OnInvalidatorStateChange(syncer::InvalidatorState state) override; |
| 99 void OnIncomingInvalidation( | 103 void OnIncomingInvalidation( |
| 100 const syncer::ObjectIdInvalidationMap& invalidation_map) override; | 104 const syncer::ObjectIdInvalidationMap& invalidation_map) override; |
| 101 std::string GetOwnerName() const override; | 105 std::string GetOwnerName() const override; |
| 102 | 106 |
| 103 // CloudPolicyCore::Observer: | 107 // CloudPolicyCore::Observer: |
| 104 void OnCoreConnected(CloudPolicyCore* core) override; | 108 void OnCoreConnected(CloudPolicyCore* core) override; |
| 105 void OnRefreshSchedulerStarted(CloudPolicyCore* core) override; | 109 void OnRefreshSchedulerStarted(CloudPolicyCore* core) override; |
| 106 void OnCoreDisconnecting(CloudPolicyCore* core) override; | 110 void OnCoreDisconnecting(CloudPolicyCore* core) override; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 238 |
| 235 // WeakPtrFactory used to create callbacks to this object. | 239 // WeakPtrFactory used to create callbacks to this object. |
| 236 base::WeakPtrFactory<CloudPolicyInvalidator> weak_factory_; | 240 base::WeakPtrFactory<CloudPolicyInvalidator> weak_factory_; |
| 237 | 241 |
| 238 DISALLOW_COPY_AND_ASSIGN(CloudPolicyInvalidator); | 242 DISALLOW_COPY_AND_ASSIGN(CloudPolicyInvalidator); |
| 239 }; | 243 }; |
| 240 | 244 |
| 241 } // namespace policy | 245 } // namespace policy |
| 242 | 246 |
| 243 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ | 247 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ |
| OLD | NEW |