OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 5 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "chrome/browser/sync/test_profile_sync_service.h" | 11 #include "chrome/browser/sync/test_profile_sync_service.h" |
12 #include "content/public/test/test_utils.h" | 12 #include "content/public/test/test_utils.h" |
13 #include "sync/internal_api/public/test/test_user_share.h" | 13 #include "sync/internal_api/public/test/test_user_share.h" |
14 #include "sync/internal_api/public/write_transaction.h" | 14 #include "sync/internal_api/public/write_transaction.h" |
15 #include "sync/protocol/sync.pb.h" | 15 #include "sync/protocol/sync.pb.h" |
16 #include "sync/util/cryptographer.h" | 16 #include "sync/util/cryptographer.h" |
17 | 17 |
18 using syncer::ModelType; | 18 using syncer::ModelType; |
19 using syncer::UserShare; | 19 using syncer::UserShare; |
20 | 20 |
21 /* static */ | 21 /* static */ |
22 syncer::ImmutableChangeRecordList | 22 syncer::ImmutableChangeRecordList |
23 ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList( | 23 ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList( |
24 int64 node_id, syncer::ChangeRecord::Action action) { | 24 int64_t node_id, |
| 25 syncer::ChangeRecord::Action action) { |
25 syncer::ChangeRecord record; | 26 syncer::ChangeRecord record; |
26 record.action = action; | 27 record.action = action; |
27 record.id = node_id; | 28 record.id = node_id; |
28 syncer::ChangeRecordList records(1, record); | 29 syncer::ChangeRecordList records(1, record); |
29 return syncer::ImmutableChangeRecordList(&records); | 30 return syncer::ImmutableChangeRecordList(&records); |
30 } | 31 } |
31 | 32 |
32 /* static */ | 33 /* static */ |
33 syncer::ImmutableChangeRecordList | 34 syncer::ImmutableChangeRecordList |
34 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList( | 35 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList( |
35 int64 node_id, const sync_pb::EntitySpecifics& specifics) { | 36 int64_t node_id, |
| 37 const sync_pb::EntitySpecifics& specifics) { |
36 syncer::ChangeRecord record; | 38 syncer::ChangeRecord record; |
37 record.action = syncer::ChangeRecord::ACTION_DELETE; | 39 record.action = syncer::ChangeRecord::ACTION_DELETE; |
38 record.id = node_id; | 40 record.id = node_id; |
39 record.specifics = specifics; | 41 record.specifics = specifics; |
40 syncer::ChangeRecordList records(1, record); | 42 syncer::ChangeRecordList records(1, record); |
41 return syncer::ImmutableChangeRecordList(&records); | 43 return syncer::ImmutableChangeRecordList(&records); |
42 } | 44 } |
43 | 45 |
44 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest() | 46 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest() |
45 // Purposefully do not use a real FILE thread, see crbug/550013. | 47 // Purposefully do not use a real FILE thread, see crbug/550013. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return callback_; | 83 return callback_; |
82 } | 84 } |
83 | 85 |
84 bool CreateRootHelper::success() { | 86 bool CreateRootHelper::success() { |
85 return success_; | 87 return success_; |
86 } | 88 } |
87 | 89 |
88 void CreateRootHelper::CreateRootCallback() { | 90 void CreateRootHelper::CreateRootCallback() { |
89 success_ = test_->CreateRoot(model_type_); | 91 success_ = test_->CreateRoot(model_type_); |
90 } | 92 } |
OLD | NEW |