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

Side by Side Diff: components/sync/driver/non_blocking_data_type_controller.cc

Issue 2389063002: [Sync] Fixing easy lint violations. (Closed)
Patch Set: Updated for Max's comments. Created 4 years, 2 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/non_blocking_data_type_controller.h" 5 #include "components/sync/driver/non_blocking_data_type_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 } 75 }
76 76
77 void NonBlockingDataTypeController::GetAllNodes( 77 void NonBlockingDataTypeController::GetAllNodes(
78 const AllNodesCallback& callback) { 78 const AllNodesCallback& callback) {
79 base::WeakPtr<ModelTypeService> service = 79 base::WeakPtr<ModelTypeService> service =
80 sync_client_->GetModelTypeServiceForType(type()); 80 sync_client_->GetModelTypeServiceForType(type());
81 // TODO(gangwu): Casting should happen "near" where the processor factory has 81 // TODO(gangwu): Casting should happen "near" where the processor factory has
82 // code that instantiates a new processor. 82 // code that instantiates a new processor.
83 SharedModelTypeProcessor* processor = 83 SharedModelTypeProcessor* processor =
84 (SharedModelTypeProcessor*)service->change_processor(); 84 static_cast<SharedModelTypeProcessor*>(service->change_processor());
85 RunOnModelThread(FROM_HERE, 85 RunOnModelThread(FROM_HERE,
86 base::Bind(&SharedModelTypeProcessor::GetAllNodes, 86 base::Bind(&SharedModelTypeProcessor::GetAllNodes,
87 base::Unretained(processor), 87 base::Unretained(processor),
88 base::ThreadTaskRunnerHandle::Get(), callback)); 88 base::ThreadTaskRunnerHandle::Get(), callback));
89 } 89 }
90 90
91 void NonBlockingDataTypeController::LoadModelsDone(ConfigureResult result, 91 void NonBlockingDataTypeController::LoadModelsDone(ConfigureResult result,
92 const SyncError& error) { 92 const SyncError& error) {
93 DCHECK(CalledOnValidThread()); 93 DCHECK(CalledOnValidThread());
94 94
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures", 221 UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures",
222 ModelTypeToHistogramInt(type()), MODEL_TYPE_COUNT); 222 ModelTypeToHistogramInt(type()), MODEL_TYPE_COUNT);
223 #define PER_DATA_TYPE_MACRO(type_str) \ 223 #define PER_DATA_TYPE_MACRO(type_str) \
224 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \ 224 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \
225 MAX_CONFIGURE_RESULT); 225 MAX_CONFIGURE_RESULT);
226 SYNC_DATA_TYPE_HISTOGRAM(type()); 226 SYNC_DATA_TYPE_HISTOGRAM(type());
227 #undef PER_DATA_TYPE_MACRO 227 #undef PER_DATA_TYPE_MACRO
228 } 228 }
229 229
230 } // namespace syncer 230 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_mock.h ('k') | components/sync/driver/startup_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698