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

Side by Side Diff: components/sync_driver/shared_change_processor.cc

Issue 1966023002: [Sync] Move DataTypeErrorHandler to //sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Found an unsaved buffer :( Created 4 years, 7 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
OLDNEW
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 "components/sync_driver/shared_change_processor.h" 5 #include "components/sync_driver/shared_change_processor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "components/sync_driver/generic_change_processor.h" 10 #include "components/sync_driver/generic_change_processor.h"
11 #include "components/sync_driver/generic_change_processor_factory.h" 11 #include "components/sync_driver/generic_change_processor_factory.h"
12 #include "components/sync_driver/sync_client.h" 12 #include "components/sync_driver/sync_client.h"
13 #include "sync/api/sync_change.h" 13 #include "sync/api/sync_change.h"
14 #include "sync/api/syncable_service.h" 14 #include "sync/api/syncable_service.h"
15 #include "sync/internal_api/public/data_type_error_handler.h"
15 16
16 using base::AutoLock; 17 using base::AutoLock;
17 18
18 namespace syncer { 19 namespace syncer {
19 class AttachmentService; 20 class AttachmentService;
20 } 21 }
21 22
22 namespace sync_driver { 23 namespace sync_driver {
23 24
24 SharedChangeProcessor::SharedChangeProcessor() 25 SharedChangeProcessor::SharedChangeProcessor()
(...skipping 21 matching lines...) Expand all
46 } 47 }
47 } else { 48 } else {
48 DCHECK(!generic_change_processor_); 49 DCHECK(!generic_change_processor_);
49 } 50 }
50 } 51 }
51 52
52 base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect( 53 base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
53 SyncClient* sync_client, 54 SyncClient* sync_client,
54 GenericChangeProcessorFactory* processor_factory, 55 GenericChangeProcessorFactory* processor_factory,
55 syncer::UserShare* user_share, 56 syncer::UserShare* user_share,
56 DataTypeErrorHandler* error_handler, 57 syncer::DataTypeErrorHandler* error_handler,
57 syncer::ModelType type, 58 syncer::ModelType type,
58 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) { 59 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) {
59 DCHECK(sync_client); 60 DCHECK(sync_client);
60 DCHECK(error_handler); 61 DCHECK(error_handler);
61 DCHECK_NE(type, syncer::UNSPECIFIED); 62 DCHECK_NE(type, syncer::UNSPECIFIED);
62 backend_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 63 backend_task_runner_ = base::ThreadTaskRunnerHandle::Get();
63 AutoLock lock(monitor_lock_); 64 AutoLock lock(monitor_lock_);
64 if (disconnected_) 65 if (disconnected_)
65 return base::WeakPtr<syncer::SyncableService>(); 66 return base::WeakPtr<syncer::SyncableService>();
66 type_ = type; 67 type_ = type;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return error_handler_->CreateAndUploadError(location, message, type_); 216 return error_handler_->CreateAndUploadError(location, message, type_);
216 } else { 217 } else {
217 return syncer::SyncError(location, 218 return syncer::SyncError(location,
218 syncer::SyncError::DATATYPE_ERROR, 219 syncer::SyncError::DATATYPE_ERROR,
219 message, 220 message,
220 type_); 221 type_);
221 } 222 }
222 } 223 }
223 224
224 } // namespace sync_driver 225 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/shared_change_processor.h ('k') | components/sync_driver/shared_change_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698