OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "sync/engine/sync_directory_update_handler.h" | 5 #include "sync/engine/sync_directory_update_handler.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "sync/engine/syncer_proto_util.h" | 10 #include "sync/engine/syncer_proto_util.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 TestEntryFactory* entry_factory() { | 285 TestEntryFactory* entry_factory() { |
286 return entry_factory_.get(); | 286 return entry_factory_.get(); |
287 } | 287 } |
288 | 288 |
289 syncable::Directory* directory() { | 289 syncable::Directory* directory() { |
290 return dir_maker_.directory(); | 290 return dir_maker_.directory(); |
291 } | 291 } |
292 | 292 |
293 private: | 293 private: |
| 294 typedef std::map<ModelType, SyncDirectoryUpdateHandler*> UpdateHandlerMap; |
| 295 |
294 base::MessageLoop loop_; // Needed to initialize the directory. | 296 base::MessageLoop loop_; // Needed to initialize the directory. |
295 TestDirectorySetterUpper dir_maker_; | 297 TestDirectorySetterUpper dir_maker_; |
296 scoped_ptr<TestEntryFactory> entry_factory_; | 298 scoped_ptr<TestEntryFactory> entry_factory_; |
297 | 299 |
298 scoped_refptr<FakeModelWorker> ui_worker_; | 300 scoped_refptr<FakeModelWorker> ui_worker_; |
299 scoped_refptr<FakeModelWorker> password_worker_; | 301 scoped_refptr<FakeModelWorker> password_worker_; |
300 scoped_refptr<FakeModelWorker> passive_worker_; | 302 scoped_refptr<FakeModelWorker> passive_worker_; |
301 | 303 |
302 UpdateHandlerMap update_handler_map_; | 304 UpdateHandlerMap update_handler_map_; |
303 STLValueDeleter<UpdateHandlerMap> update_handler_map_deleter_; | 305 STLValueDeleter<UpdateHandlerMap> update_handler_map_deleter_; |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 syncable::Entry e1(&trans, syncable::GET_BY_HANDLE, decryptable_handle); | 819 syncable::Entry e1(&trans, syncable::GET_BY_HANDLE, decryptable_handle); |
818 syncable::Entry e2(&trans, syncable::GET_BY_HANDLE, undecryptable_handle); | 820 syncable::Entry e2(&trans, syncable::GET_BY_HANDLE, undecryptable_handle); |
819 ASSERT_TRUE(e1.good()); | 821 ASSERT_TRUE(e1.good()); |
820 ASSERT_TRUE(e2.good()); | 822 ASSERT_TRUE(e2.good()); |
821 EXPECT_FALSE(e1.GetIsUnappliedUpdate()); | 823 EXPECT_FALSE(e1.GetIsUnappliedUpdate()); |
822 EXPECT_TRUE(e2.GetIsUnappliedUpdate()); | 824 EXPECT_TRUE(e2.GetIsUnappliedUpdate()); |
823 } | 825 } |
824 } | 826 } |
825 | 827 |
826 } // namespace syncer | 828 } // namespace syncer |
OLD | NEW |