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

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

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 11 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/ui_data_type_controller.h" 5 #include "components/sync_driver/ui_data_type_controller.h"
6 6
7 #include <utility>
8
7 #include "base/location.h" 9 #include "base/location.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
10 #include "base/profiler/scoped_tracker.h" 12 #include "base/profiler/scoped_tracker.h"
11 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
12 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
13 #include "components/sync_driver/generic_change_processor_factory.h" 15 #include "components/sync_driver/generic_change_processor_factory.h"
14 #include "components/sync_driver/shared_change_processor_ref.h" 16 #include "components/sync_driver/shared_change_processor_ref.h"
15 #include "components/sync_driver/sync_client.h" 17 #include "components/sync_driver/sync_client.h"
16 #include "components/sync_driver/sync_service.h" 18 #include "components/sync_driver/sync_service.h"
(...skipping 23 matching lines...) Expand all
40 type_(type), 42 type_(type),
41 processor_factory_(new GenericChangeProcessorFactory()), 43 processor_factory_(new GenericChangeProcessorFactory()),
42 ui_thread_(ui_thread) { 44 ui_thread_(ui_thread) {
43 DCHECK(ui_thread_->BelongsToCurrentThread()); 45 DCHECK(ui_thread_->BelongsToCurrentThread());
44 DCHECK(syncer::IsRealDataType(type_)); 46 DCHECK(syncer::IsRealDataType(type_));
45 } 47 }
46 48
47 void UIDataTypeController::SetGenericChangeProcessorFactoryForTest( 49 void UIDataTypeController::SetGenericChangeProcessorFactoryForTest(
48 scoped_ptr<GenericChangeProcessorFactory> factory) { 50 scoped_ptr<GenericChangeProcessorFactory> factory) {
49 DCHECK_EQ(state_, NOT_RUNNING); 51 DCHECK_EQ(state_, NOT_RUNNING);
50 processor_factory_ = factory.Pass(); 52 processor_factory_ = std::move(factory);
51 } 53 }
52 54
53 UIDataTypeController::~UIDataTypeController() { 55 UIDataTypeController::~UIDataTypeController() {
54 DCHECK(ui_thread_->BelongsToCurrentThread()); 56 DCHECK(ui_thread_->BelongsToCurrentThread());
55 } 57 }
56 58
57 void UIDataTypeController::LoadModels( 59 void UIDataTypeController::LoadModels(
58 const ModelLoadCallback& model_load_callback) { 60 const ModelLoadCallback& model_load_callback) {
59 DCHECK(ui_thread_->BelongsToCurrentThread()); 61 DCHECK(ui_thread_->BelongsToCurrentThread());
60 DCHECK(syncer::IsRealDataType(type_)); 62 DCHECK(syncer::IsRealDataType(type_));
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 ModelTypeToHistogramInt(type()), 386 ModelTypeToHistogramInt(type()),
385 syncer::MODEL_TYPE_COUNT); 387 syncer::MODEL_TYPE_COUNT);
386 #define PER_DATA_TYPE_MACRO(type_str) \ 388 #define PER_DATA_TYPE_MACRO(type_str) \
387 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \ 389 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \
388 MAX_CONFIGURE_RESULT); 390 MAX_CONFIGURE_RESULT);
389 SYNC_DATA_TYPE_HISTOGRAM(type()); 391 SYNC_DATA_TYPE_HISTOGRAM(type());
390 #undef PER_DATA_TYPE_MACRO 392 #undef PER_DATA_TYPE_MACRO
391 } 393 }
392 394
393 } // namespace sync_driver 395 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/sync_api_component_factory_mock.cc ('k') | components/sync_driver/ui_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698