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 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace syncer { | 24 namespace syncer { |
25 class TestIdFactory; | 25 class TestIdFactory; |
26 } // namespace syncer | 26 } // namespace syncer |
27 | 27 |
28 namespace syncer { | 28 namespace syncer { |
29 struct UserShare; | 29 struct UserShare; |
30 } // namespace syncer | 30 } // namespace syncer |
31 | 31 |
32 class ProfileSyncServiceTestHelper { | 32 class ProfileSyncServiceTestHelper { |
33 public: | 33 public: |
34 static const std::string GetTagForType(syncer::ModelType model_type); | |
35 | |
36 static bool CreateRoot(syncer::ModelType model_type, | |
37 syncer::UserShare* service, | |
38 syncer::TestIdFactory* ids); | |
39 | |
40 static syncer::ImmutableChangeRecordList MakeSingletonChangeRecordList( | 34 static syncer::ImmutableChangeRecordList MakeSingletonChangeRecordList( |
41 int64 node_id, syncer::ChangeRecord::Action action); | 35 int64 node_id, syncer::ChangeRecord::Action action); |
42 | 36 |
43 // Deletions must provide an EntitySpecifics for the deleted data. | 37 // Deletions must provide an EntitySpecifics for the deleted data. |
44 static syncer::ImmutableChangeRecordList | 38 static syncer::ImmutableChangeRecordList |
45 MakeSingletonDeletionChangeRecordList( | 39 MakeSingletonDeletionChangeRecordList( |
46 int64 node_id, | 40 int64 node_id, |
47 const sync_pb::EntitySpecifics& specifics); | 41 const sync_pb::EntitySpecifics& specifics); |
48 }; | 42 }; |
49 | 43 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 private: | 75 private: |
82 void CreateRootCallback(); | 76 void CreateRootCallback(); |
83 | 77 |
84 base::Closure callback_; | 78 base::Closure callback_; |
85 AbstractProfileSyncServiceTest* test_; | 79 AbstractProfileSyncServiceTest* test_; |
86 syncer::ModelType model_type_; | 80 syncer::ModelType model_type_; |
87 bool success_; | 81 bool success_; |
88 }; | 82 }; |
89 | 83 |
90 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 84 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
OLD | NEW |