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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.cc

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/sync/test_profile_sync_service.h" 10 #include "chrome/browser/sync/test_profile_sync_service.h"
11 #include "sync/internal_api/public/write_transaction.h" 11 #include "sync/internal_api/public/write_transaction.h"
12 #include "sync/protocol/sync.pb.h" 12 #include "sync/protocol/sync.pb.h"
13 #include "sync/syncable/entry.h" 13 #include "sync/syncable/entry.h"
14 #include "sync/syncable/mutable_entry.h" 14 #include "sync/syncable/mutable_entry.h"
15 #include "sync/syncable/write_transaction.h" 15 #include "sync/syncable/write_transaction.h"
16 #include "sync/test/engine/test_id_factory.h" 16 #include "sync/test/engine/test_id_factory.h"
17 #include "sync/util/cryptographer.h" 17 #include "sync/util/cryptographer.h"
18 18
19 using csync::TestIdFactory; 19 using syncer::TestIdFactory;
20 using content::BrowserThread; 20 using content::BrowserThread;
21 using csync::UserShare; 21 using syncer::UserShare;
22 using syncable::BASE_VERSION; 22 using syncable::BASE_VERSION;
23 using syncable::CREATE; 23 using syncable::CREATE;
24 using syncable::IS_DEL; 24 using syncable::IS_DEL;
25 using syncable::IS_DIR; 25 using syncable::IS_DIR;
26 using syncable::IS_UNAPPLIED_UPDATE; 26 using syncable::IS_UNAPPLIED_UPDATE;
27 using syncable::IS_UNSYNCED; 27 using syncable::IS_UNSYNCED;
28 using syncable::ModelType; 28 using syncable::ModelType;
29 using syncable::MutableEntry; 29 using syncable::MutableEntry;
30 using syncable::SERVER_IS_DIR; 30 using syncable::SERVER_IS_DIR;
31 using syncable::SERVER_VERSION; 31 using syncable::SERVER_VERSION;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 node.Put(IS_DEL, false); 63 node.Put(IS_DEL, false);
64 node.Put(syncable::ID, ids->MakeServer(tag_name)); 64 node.Put(syncable::ID, ids->MakeServer(tag_name));
65 sync_pb::EntitySpecifics specifics; 65 sync_pb::EntitySpecifics specifics;
66 syncable::AddDefaultFieldValue(model_type, &specifics); 66 syncable::AddDefaultFieldValue(model_type, &specifics);
67 node.Put(SPECIFICS, specifics); 67 node.Put(SPECIFICS, specifics);
68 68
69 return true; 69 return true;
70 } 70 }
71 71
72 /* static */ 72 /* static */
73 csync::ImmutableChangeRecordList 73 syncer::ImmutableChangeRecordList
74 ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList( 74 ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
75 int64 node_id, csync::ChangeRecord::Action action) { 75 int64 node_id, syncer::ChangeRecord::Action action) {
76 csync::ChangeRecord record; 76 syncer::ChangeRecord record;
77 record.action = action; 77 record.action = action;
78 record.id = node_id; 78 record.id = node_id;
79 csync::ChangeRecordList records(1, record); 79 syncer::ChangeRecordList records(1, record);
80 return csync::ImmutableChangeRecordList(&records); 80 return syncer::ImmutableChangeRecordList(&records);
81 } 81 }
82 82
83 /* static */ 83 /* static */
84 csync::ImmutableChangeRecordList 84 syncer::ImmutableChangeRecordList
85 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList( 85 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList(
86 int64 node_id, const sync_pb::EntitySpecifics& specifics) { 86 int64 node_id, const sync_pb::EntitySpecifics& specifics) {
87 csync::ChangeRecord record; 87 syncer::ChangeRecord record;
88 record.action = csync::ChangeRecord::ACTION_DELETE; 88 record.action = syncer::ChangeRecord::ACTION_DELETE;
89 record.id = node_id; 89 record.id = node_id;
90 record.specifics = specifics; 90 record.specifics = specifics;
91 csync::ChangeRecordList records(1, record); 91 syncer::ChangeRecordList records(1, record);
92 return csync::ImmutableChangeRecordList(&records); 92 return syncer::ImmutableChangeRecordList(&records);
93 } 93 }
94 94
95 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest() 95 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest()
96 : ui_thread_(BrowserThread::UI, &ui_loop_), 96 : ui_thread_(BrowserThread::UI, &ui_loop_),
97 db_thread_(BrowserThread::DB), 97 db_thread_(BrowserThread::DB),
98 file_thread_(BrowserThread::FILE), 98 file_thread_(BrowserThread::FILE),
99 io_thread_(BrowserThread::IO) { 99 io_thread_(BrowserThread::IO) {
100 } 100 }
101 101
102 AbstractProfileSyncServiceTest::~AbstractProfileSyncServiceTest() {} 102 AbstractProfileSyncServiceTest::~AbstractProfileSyncServiceTest() {}
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return callback_; 147 return callback_;
148 } 148 }
149 149
150 bool CreateRootHelper::success() { 150 bool CreateRootHelper::success() {
151 return success_; 151 return success_;
152 } 152 }
153 153
154 void CreateRootHelper::CreateRootCallback() { 154 void CreateRootHelper::CreateRootCallback() {
155 success_ = test_->CreateRoot(model_type_); 155 success_ = test_->CreateRoot(model_type_);
156 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.h ('k') | chrome/browser/sync/backend_migrator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698