OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ | 8 #ifndef SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ |
9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ | 9 #define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const ObjectIdSet& ids) OVERRIDE; | 61 const ObjectIdSet& ids) OVERRIDE; |
62 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; | 62 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE; |
63 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; | 63 virtual InvalidatorState GetInvalidatorState() const OVERRIDE; |
64 virtual void UpdateCredentials( | 64 virtual void UpdateCredentials( |
65 const std::string& email, const std::string& token) OVERRIDE; | 65 const std::string& email, const std::string& token) OVERRIDE; |
66 | 66 |
67 // InvalidationHandler implementation. | 67 // InvalidationHandler implementation. |
68 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; | 68 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; |
69 virtual void OnIncomingInvalidation( | 69 virtual void OnIncomingInvalidation( |
70 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 70 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 71 virtual std::string GetOwnerName() const OVERRIDE; |
71 | 72 |
72 // Static functions to construct callback that creates network channel for | 73 // Static functions to construct callback that creates network channel for |
73 // SyncSystemResources. The goal is to pass network channel to invalidator at | 74 // SyncSystemResources. The goal is to pass network channel to invalidator at |
74 // the same time not exposing channel specific parameters to invalidator and | 75 // the same time not exposing channel specific parameters to invalidator and |
75 // channel implementation to client of invalidator. | 76 // channel implementation to client of invalidator. |
76 static NetworkChannelCreator MakePushClientChannelCreator( | 77 static NetworkChannelCreator MakePushClientChannelCreator( |
77 const notifier::NotifierOptions& notifier_options); | 78 const notifier::NotifierOptions& notifier_options); |
78 static NetworkChannelCreator MakeGCMNetworkChannelCreator( | 79 static NetworkChannelCreator MakeGCMNetworkChannelCreator( |
79 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 80 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
80 scoped_ptr<GCMNetworkChannelDelegate> delegate); | 81 scoped_ptr<GCMNetworkChannelDelegate> delegate); |
(...skipping 10 matching lines...) Expand all Loading... |
91 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; | 92 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
92 | 93 |
93 base::WeakPtrFactory<NonBlockingInvalidator> weak_ptr_factory_; | 94 base::WeakPtrFactory<NonBlockingInvalidator> weak_ptr_factory_; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidator); | 96 DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidator); |
96 }; | 97 }; |
97 | 98 |
98 } // namespace syncer | 99 } // namespace syncer |
99 | 100 |
100 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ | 101 #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATOR_H_ |
OLD | NEW |