| 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_INVALIDATION_INVALIDATION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ | 6 #define CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "components/keyed_service/core/keyed_service.h" | 9 #include "components/keyed_service/core/keyed_service.h" |
| 10 #include "sync/notifier/invalidation_util.h" | 10 #include "sync/notifier/invalidation_util.h" |
| 11 #include "sync/notifier/invalidator_state.h" | 11 #include "sync/notifier/invalidator_state.h" |
| 12 | 12 |
| 13 namespace syncer { | 13 namespace syncer { |
| 14 class InvalidationHandler; | 14 class InvalidationHandler; |
| 15 } // namespace syncer | 15 } // namespace syncer |
| 16 | 16 |
| 17 namespace invalidation { | 17 namespace invalidation { |
| 18 class InvalidationAuthProvider; |
| 18 class InvalidationLogger; | 19 class InvalidationLogger; |
| 19 | 20 |
| 20 // Interface for classes that handle invalidation registrations and send out | 21 // Interface for classes that handle invalidation registrations and send out |
| 21 // invalidations to register handlers. | 22 // invalidations to register handlers. |
| 22 // | 23 // |
| 23 // Invalidation clients should follow the pattern below: | 24 // Invalidation clients should follow the pattern below: |
| 24 // | 25 // |
| 25 // When starting the client: | 26 // When starting the client: |
| 26 // | 27 // |
| 27 // frontend->RegisterInvalidationHandler(client_handler); | 28 // frontend->RegisterInvalidationHandler(client_handler); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // prevent the receipt of notifications of our own changes. | 102 // prevent the receipt of notifications of our own changes. |
| 102 virtual std::string GetInvalidatorClientId() const = 0; | 103 virtual std::string GetInvalidatorClientId() const = 0; |
| 103 | 104 |
| 104 // Return the logger used to debug invalidations | 105 // Return the logger used to debug invalidations |
| 105 virtual InvalidationLogger* GetInvalidationLogger() = 0; | 106 virtual InvalidationLogger* GetInvalidationLogger() = 0; |
| 106 | 107 |
| 107 // Triggers requests of internal status. | 108 // Triggers requests of internal status. |
| 108 virtual void RequestDetailedStatus( | 109 virtual void RequestDetailedStatus( |
| 109 base::Callback<void(const base::DictionaryValue&)> post_caller) = 0; | 110 base::Callback<void(const base::DictionaryValue&)> post_caller) = 0; |
| 110 | 111 |
| 112 // Returns the authentication provider. |
| 113 virtual InvalidationAuthProvider* GetInvalidationAuthProvider() = 0; |
| 114 |
| 111 protected: | 115 protected: |
| 112 virtual ~InvalidationService() { } | 116 virtual ~InvalidationService() { } |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace invalidation | 119 } // namespace invalidation |
| 116 | 120 |
| 117 #endif // CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ | 121 #endif // CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_H_ |
| OLD | NEW |