| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // A simple wrapper around invalidation::InvalidationClient that | 5 // A simple wrapper around invalidation::InvalidationClient that |
| 6 // handles all the startup/shutdown details and hookups. | 6 // handles all the startup/shutdown details and hookups. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| 9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // properly notify invalidation_client_. | 34 // properly notify invalidation_client_. |
| 35 | 35 |
| 36 class ChromeInvalidationClient | 36 class ChromeInvalidationClient |
| 37 : public invalidation::InvalidationListener, | 37 : public invalidation::InvalidationListener, |
| 38 public StateWriter { | 38 public StateWriter { |
| 39 public: | 39 public: |
| 40 class Listener { | 40 class Listener { |
| 41 public: | 41 public: |
| 42 virtual ~Listener(); | 42 virtual ~Listener(); |
| 43 | 43 |
| 44 virtual void OnInvalidate(syncable::ModelType model_type) = 0; | 44 virtual void OnInvalidate(syncable::ModelType model_type, |
| 45 const std::string& payload) = 0; |
| 45 | 46 |
| 46 virtual void OnInvalidateAll() = 0; | 47 virtual void OnInvalidateAll() = 0; |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 ChromeInvalidationClient(); | 50 ChromeInvalidationClient(); |
| 50 | 51 |
| 51 // Calls Stop(). | 52 // Calls Stop(). |
| 52 virtual ~ChromeInvalidationClient(); | 53 virtual ~ChromeInvalidationClient(); |
| 53 | 54 |
| 54 // Does not take ownership of |listener| or |state_writer|. | 55 // Does not take ownership of |listener| or |state_writer|. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 scoped_ptr<CacheInvalidationPacketHandler> | 111 scoped_ptr<CacheInvalidationPacketHandler> |
| 111 cache_invalidation_packet_handler_; | 112 cache_invalidation_packet_handler_; |
| 112 scoped_ptr<RegistrationManager> registration_manager_; | 113 scoped_ptr<RegistrationManager> registration_manager_; |
| 113 | 114 |
| 114 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); | 115 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 } // namespace sync_notifier | 118 } // namespace sync_notifier |
| 118 | 119 |
| 119 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 120 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
| OLD | NEW |