OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/invalidation/non_blocking_invalidator.h" | 5 #include "components/invalidation/non_blocking_invalidator.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void Initialize( | 109 void Initialize( |
110 const NonBlockingInvalidator::InitializeOptions& initialize_options); | 110 const NonBlockingInvalidator::InitializeOptions& initialize_options); |
111 void Teardown(); | 111 void Teardown(); |
112 void UpdateRegisteredIds(const ObjectIdSet& ids); | 112 void UpdateRegisteredIds(const ObjectIdSet& ids); |
113 void UpdateCredentials(const std::string& email, const std::string& token); | 113 void UpdateCredentials(const std::string& email, const std::string& token); |
114 void RequestDetailedStatus( | 114 void RequestDetailedStatus( |
115 base::Callback<void(const base::DictionaryValue&)> callback) const; | 115 base::Callback<void(const base::DictionaryValue&)> callback) const; |
116 | 116 |
117 // InvalidationHandler implementation (all called on I/O thread by | 117 // InvalidationHandler implementation (all called on I/O thread by |
118 // InvalidationNotifier). | 118 // InvalidationNotifier). |
119 virtual void OnInvalidatorStateChange(InvalidatorState reason) OVERRIDE; | 119 virtual void OnInvalidatorStateChange(InvalidatorState reason) override; |
120 virtual void OnIncomingInvalidation( | 120 virtual void OnIncomingInvalidation( |
121 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 121 const ObjectIdInvalidationMap& invalidation_map) override; |
122 virtual std::string GetOwnerName() const OVERRIDE; | 122 virtual std::string GetOwnerName() const override; |
123 | 123 |
124 private: | 124 private: |
125 friend class | 125 friend class |
126 base::RefCountedThreadSafe<NonBlockingInvalidator::Core>; | 126 base::RefCountedThreadSafe<NonBlockingInvalidator::Core>; |
127 // Called on parent or I/O thread. | 127 // Called on parent or I/O thread. |
128 virtual ~Core(); | 128 virtual ~Core(); |
129 | 129 |
130 // The variables below should be used only on the I/O thread. | 130 // The variables below should be used only on the I/O thread. |
131 const base::WeakPtr<NonBlockingInvalidator> delegate_observer_; | 131 const base::WeakPtr<NonBlockingInvalidator> delegate_observer_; |
132 scoped_refptr<base::SingleThreadTaskRunner> delegate_observer_task_runner_; | 132 scoped_refptr<base::SingleThreadTaskRunner> delegate_observer_task_runner_; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 void NonBlockingInvalidator::OnIncomingInvalidation( | 377 void NonBlockingInvalidator::OnIncomingInvalidation( |
378 const ObjectIdInvalidationMap& invalidation_map) { | 378 const ObjectIdInvalidationMap& invalidation_map) { |
379 DCHECK(parent_task_runner_->BelongsToCurrentThread()); | 379 DCHECK(parent_task_runner_->BelongsToCurrentThread()); |
380 registrar_.DispatchInvalidationsToHandlers(invalidation_map); | 380 registrar_.DispatchInvalidationsToHandlers(invalidation_map); |
381 } | 381 } |
382 | 382 |
383 std::string NonBlockingInvalidator::GetOwnerName() const { return "Sync"; } | 383 std::string NonBlockingInvalidator::GetOwnerName() const { return "Sync"; } |
384 | 384 |
385 } // namespace syncer | 385 } // namespace syncer |
OLD | NEW |