| OLD | NEW |
| 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/non_ui_data_type_controller.h" | 5 #include "components/sync_driver/non_ui_data_type_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.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/shared_change_processor_ref.h" | 10 #include "components/sync_driver/shared_change_processor_ref.h" |
| 11 #include "components/sync_driver/sync_api_component_factory.h" | 11 #include "components/sync_driver/sync_api_component_factory.h" |
| 12 #include "sync/api/sync_error.h" | 12 #include "sync/api/sync_error.h" |
| 13 #include "sync/api/syncable_service.h" | 13 #include "sync/api/syncable_service.h" |
| 14 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
| 15 #include "sync/util/data_type_histogram.h" | 15 #include "sync/util/data_type_histogram.h" |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace sync_driver { |
| 18 | 18 |
| 19 SharedChangeProcessor* | 19 SharedChangeProcessor* |
| 20 NonUIDataTypeController::CreateSharedChangeProcessor() { | 20 NonUIDataTypeController::CreateSharedChangeProcessor() { |
| 21 return new SharedChangeProcessor(); | 21 return new SharedChangeProcessor(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 NonUIDataTypeController::NonUIDataTypeController( | 24 NonUIDataTypeController::NonUIDataTypeController( |
| 25 scoped_refptr<base::MessageLoopProxy> ui_thread, | 25 scoped_refptr<base::MessageLoopProxy> ui_thread, |
| 26 const base::Closure& error_callback, | 26 const base::Closure& error_callback, |
| 27 const DisableTypeCallback& disable_callback, | 27 const DisableTypeCallback& disable_callback, |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 base::Bind(&NonUIDataTypeController::StopLocalService, this)); | 430 base::Bind(&NonUIDataTypeController::StopLocalService, this)); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void NonUIDataTypeController::StopLocalService() { | 433 void NonUIDataTypeController::StopLocalService() { |
| 434 DCHECK(!ui_thread_->BelongsToCurrentThread()); | 434 DCHECK(!ui_thread_->BelongsToCurrentThread()); |
| 435 if (local_service_.get()) | 435 if (local_service_.get()) |
| 436 local_service_->StopSyncing(type()); | 436 local_service_->StopSyncing(type()); |
| 437 local_service_.reset(); | 437 local_service_.reset(); |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace browser_sync | 440 } // namespace sync_driver |
| OLD | NEW |