| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // An implementation of SyncNotifier that wraps InvalidationNotifier | 5 // An implementation of SyncNotifier that wraps InvalidationNotifier |
| 6 // on its own thread. | 6 // on its own thread. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ | 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ |
| 9 #define CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ | 9 #define CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual ~NonBlockingInvalidationNotifier(); | 32 virtual ~NonBlockingInvalidationNotifier(); |
| 33 | 33 |
| 34 // SyncNotifier implementation. | 34 // SyncNotifier implementation. |
| 35 virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE; | 35 virtual void AddObserver(SyncNotifierObserver* observer) OVERRIDE; |
| 36 virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE; | 36 virtual void RemoveObserver(SyncNotifierObserver* observer) OVERRIDE; |
| 37 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; | 37 virtual void SetUniqueId(const std::string& unique_id) OVERRIDE; |
| 38 virtual void SetState(const std::string& state) OVERRIDE; | 38 virtual void SetState(const std::string& state) OVERRIDE; |
| 39 virtual void UpdateCredentials( | 39 virtual void UpdateCredentials( |
| 40 const std::string& email, const std::string& token) OVERRIDE; | 40 const std::string& email, const std::string& token) OVERRIDE; |
| 41 virtual void UpdateEnabledTypes( | 41 virtual void UpdateEnabledTypes( |
| 42 const syncable::ModelTypeSet& types) OVERRIDE; | 42 const syncable::ModelTypeSet& enabled_types) OVERRIDE; |
| 43 virtual void SendNotification() OVERRIDE; | 43 virtual void SendNotification( |
| 44 const syncable::ModelTypeSet& changed_types) OVERRIDE; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 // The real guts of NonBlockingInvalidationNotifier, which allows this class | 47 // The real guts of NonBlockingInvalidationNotifier, which allows this class |
| 47 // to not be refcounted. | 48 // to not be refcounted. |
| 48 class Core; | 49 class Core; |
| 49 scoped_refptr<Core> core_; | 50 scoped_refptr<Core> core_; |
| 50 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_; | 51 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_; |
| 51 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 52 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 52 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier); | 53 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace sync_notifier | 56 } // namespace sync_notifier |
| 56 | 57 |
| 57 #endif // CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ | 58 #endif // CHROME_BROWSER_SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ |
| OLD | NEW |