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

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

Issue 408003002: [Sync] Fix namespace for sync_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 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 "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "components/sync_driver/generic_change_processor.h" 8 #include "components/sync_driver/generic_change_processor.h"
9 #include "components/sync_driver/generic_change_processor_factory.h" 9 #include "components/sync_driver/generic_change_processor_factory.h"
10 #include "components/sync_driver/sync_api_component_factory.h" 10 #include "components/sync_driver/sync_api_component_factory.h"
11 #include "sync/api/sync_change.h" 11 #include "sync/api/sync_change.h"
12 12
13 using base::AutoLock; 13 using base::AutoLock;
14 14
15 namespace browser_sync { 15 namespace sync_driver {
16 16
17 SharedChangeProcessor::SharedChangeProcessor() 17 SharedChangeProcessor::SharedChangeProcessor()
18 : disconnected_(false), 18 : disconnected_(false),
19 type_(syncer::UNSPECIFIED), 19 type_(syncer::UNSPECIFIED),
20 frontend_loop_(base::MessageLoopProxy::current()), 20 frontend_loop_(base::MessageLoopProxy::current()),
21 generic_change_processor_(NULL), 21 generic_change_processor_(NULL),
22 error_handler_(NULL) { 22 error_handler_(NULL) {
23 } 23 }
24 24
25 SharedChangeProcessor::~SharedChangeProcessor() { 25 SharedChangeProcessor::~SharedChangeProcessor() {
(...skipping 10 matching lines...) Expand all
36 DCHECK(!generic_change_processor_); 36 DCHECK(!generic_change_processor_);
37 } 37 }
38 } else { 38 } else {
39 DCHECK(backend_loop_.get()); 39 DCHECK(backend_loop_.get());
40 DCHECK(backend_loop_->BelongsToCurrentThread()); 40 DCHECK(backend_loop_->BelongsToCurrentThread());
41 delete generic_change_processor_; 41 delete generic_change_processor_;
42 } 42 }
43 } 43 }
44 44
45 base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect( 45 base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
46 browser_sync::SyncApiComponentFactory* sync_factory, 46 SyncApiComponentFactory* sync_factory,
47 GenericChangeProcessorFactory* processor_factory, 47 GenericChangeProcessorFactory* processor_factory,
48 syncer::UserShare* user_share, 48 syncer::UserShare* user_share,
49 DataTypeErrorHandler* error_handler, 49 DataTypeErrorHandler* error_handler,
50 syncer::ModelType type, 50 syncer::ModelType type,
51 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) { 51 const base::WeakPtr<syncer::SyncMergeResult>& merge_result) {
52 DCHECK(sync_factory); 52 DCHECK(sync_factory);
53 DCHECK(error_handler); 53 DCHECK(error_handler);
54 DCHECK_NE(type, syncer::UNSPECIFIED); 54 DCHECK_NE(type, syncer::UNSPECIFIED);
55 backend_loop_ = base::MessageLoopProxy::current(); 55 backend_loop_ = base::MessageLoopProxy::current();
56 AutoLock lock(monitor_lock_); 56 AutoLock lock(monitor_lock_);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (!disconnected_) { 201 if (!disconnected_) {
202 return error_handler_->CreateAndUploadError(location, message, type_); 202 return error_handler_->CreateAndUploadError(location, message, type_);
203 } else { 203 } else {
204 return syncer::SyncError(location, 204 return syncer::SyncError(location,
205 syncer::SyncError::DATATYPE_ERROR, 205 syncer::SyncError::DATATYPE_ERROR,
206 message, 206 message,
207 type_); 207 type_);
208 } 208 }
209 } 209 }
210 210
211 } // namespace browser_sync 211 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/shared_change_processor.h ('k') | components/sync_driver/shared_change_processor_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698