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 "sync/engine/model_type_worker.h" | 5 #include "components/sync/engine_impl/model_type_worker.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "sync/engine/commit_contribution.h" | 15 #include "components/sync/base/model_type.h" |
16 #include "sync/internal_api/public/base/model_type.h" | 16 #include "components/sync/core/model_type_processor.h" |
17 #include "sync/internal_api/public/model_type_processor.h" | 17 #include "components/sync/core/non_blocking_sync_common.h" |
18 #include "sync/internal_api/public/non_blocking_sync_common.h" | 18 #include "components/sync/engine_impl/commit_contribution.h" |
19 #include "sync/protocol/data_type_state.pb.h" | 19 #include "components/sync/protocol/data_type_state.pb.h" |
20 #include "sync/protocol/sync.pb.h" | 20 #include "components/sync/protocol/sync.pb.h" |
21 #include "sync/sessions/status_controller.h" | 21 #include "components/sync/sessions_impl/status_controller.h" |
22 #include "sync/syncable/syncable_util.h" | 22 #include "components/sync/syncable/syncable_util.h" |
23 #include "sync/test/engine/mock_model_type_processor.h" | 23 #include "components/sync/test/engine/mock_model_type_processor.h" |
24 #include "sync/test/engine/mock_nudge_handler.h" | 24 #include "components/sync/test/engine/mock_nudge_handler.h" |
25 #include "sync/test/engine/single_type_mock_server.h" | 25 #include "components/sync/test/engine/single_type_mock_server.h" |
26 #include "sync/test/fake_encryptor.h" | 26 #include "components/sync/test/fake_encryptor.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 static const syncer::ModelType kModelType = syncer::PREFERENCES; | 29 static const syncer::ModelType kModelType = syncer::PREFERENCES; |
30 | 30 |
31 // Special constant value taken from cryptographer.cc. | 31 // Special constant value taken from cryptographer.cc. |
32 const char kNigoriKeyName[] = "nigori-key"; | 32 const char kNigoriKeyName[] = "nigori-key"; |
33 | 33 |
34 namespace syncer_v2 { | 34 namespace syncer_v2 { |
35 | 35 |
36 using syncer::Cryptographer; | 36 using syncer::Cryptographer; |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 // disconnected. | 1213 // disconnected. |
1214 TEST_F(ModelTypeWorkerTest, DisconnectProcessorFromSyncTest) { | 1214 TEST_F(ModelTypeWorkerTest, DisconnectProcessorFromSyncTest) { |
1215 // Initialize the worker with basic state. | 1215 // Initialize the worker with basic state. |
1216 NormalInitialize(); | 1216 NormalInitialize(); |
1217 EXPECT_FALSE(IsProcessorDisconnected()); | 1217 EXPECT_FALSE(IsProcessorDisconnected()); |
1218 ResetWorker(); | 1218 ResetWorker(); |
1219 EXPECT_TRUE(IsProcessorDisconnected()); | 1219 EXPECT_TRUE(IsProcessorDisconnected()); |
1220 } | 1220 } |
1221 | 1221 |
1222 } // namespace syncer_v2 | 1222 } // namespace syncer_v2 |
OLD | NEW |