Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Side by Side Diff: components/sync_driver/shared_change_processor.h

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_
7 7
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "components/sync_driver/data_type_error_handler.h" 13 #include "components/sync_driver/data_type_error_handler.h"
14 #include "sync/api/sync_change_processor.h" 14 #include "sync/api/sync_change_processor.h"
15 #include "sync/api/sync_data.h" 15 #include "sync/api/sync_data.h"
16 #include "sync/api/sync_error.h" 16 #include "sync/api/sync_error.h"
17 #include "sync/api/sync_error_factory.h" 17 #include "sync/api/sync_error_factory.h"
18 #include "sync/api/sync_merge_result.h" 18 #include "sync/api/sync_merge_result.h"
19 #include "sync/internal_api/public/engine/model_safe_worker.h" 19 #include "sync/internal_api/public/engine/model_safe_worker.h"
20 20
21 namespace syncer { 21 namespace syncer {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // processor return errors. This enables us to shut down the syncer without 116 // processor return errors. This enables us to shut down the syncer without
117 // having to wait for possibly non-UI thread datatypes to complete work. 117 // having to wait for possibly non-UI thread datatypes to complete work.
118 mutable base::Lock monitor_lock_; 118 mutable base::Lock monitor_lock_;
119 bool disconnected_; 119 bool disconnected_;
120 120
121 // The sync datatype we were last connected to. 121 // The sync datatype we were last connected to.
122 syncer::ModelType type_; 122 syncer::ModelType type_;
123 123
124 // The frontend / UI MessageLoop this object is constructed on. May also be 124 // The frontend / UI MessageLoop this object is constructed on. May also be
125 // destructed and/or disconnected on this loop, see ~SharedChangeProcessor. 125 // destructed and/or disconnected on this loop, see ~SharedChangeProcessor.
126 const scoped_refptr<const base::MessageLoopProxy> frontend_loop_; 126 const scoped_refptr<const base::SingleThreadTaskRunner> frontend_task_runner_;
127 127
128 // The loop that all methods except the constructor, destructor, and 128 // The loop that all methods except the constructor, destructor, and
129 // Disconnect() should be called on. Set in Connect(). 129 // Disconnect() should be called on. Set in Connect().
130 scoped_refptr<base::MessageLoopProxy> backend_loop_; 130 scoped_refptr<base::SingleThreadTaskRunner> backend_task_runner_;
131 131
132 // Used only on |backend_loop_|. 132 // Used only on |backend_loop_|.
133 GenericChangeProcessor* generic_change_processor_; 133 GenericChangeProcessor* generic_change_processor_;
134 134
135 DataTypeErrorHandler* error_handler_; 135 DataTypeErrorHandler* error_handler_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessor); 137 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessor);
138 }; 138 };
139 139
140 } // namespace sync_driver 140 } // namespace sync_driver
141 141
142 #endif // COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_ 142 #endif // COMPONENTS_SYNC_DRIVER_SHARED_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « components/sync_driver/proxy_data_type_controller.cc ('k') | components/sync_driver/shared_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698