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

Unified Diff: components/sync/model/model_type_debug_info.cc

Issue 2458013002: [Sync] Rename ModelTypeService to ModelTypeSyncBridge. (Closed)
Patch Set: s/SetBridgeError/ErrorOnNextCall 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/model/model_type_debug_info.h ('k') | components/sync/model/model_type_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/model_type_debug_info.cc
diff --git a/components/sync/model/model_type_debug_info.cc b/components/sync/model/model_type_debug_info.cc
index 92d514a68c0a07131dea4f3942eeb4a652c1da43..fa104ce7b72b6a44e836bf311cce27b0624427ca 100644
--- a/components/sync/model/model_type_debug_info.cc
+++ b/components/sync/model/model_type_debug_info.cc
@@ -4,6 +4,9 @@
#include "components/sync/model/model_type_debug_info.h"
+#include <string>
+#include <utility>
+
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "components/sync/model_impl/processor_entity_tracker.h"
@@ -13,15 +16,15 @@ namespace syncer {
namespace {
-SharedModelTypeProcessor* GetProcessorFromService(
- const base::WeakPtr<ModelTypeService>& service) {
- if (!service.get()) {
+SharedModelTypeProcessor* GetProcessorFromBridge(
+ const base::WeakPtr<ModelTypeSyncBridge>& bridge) {
+ if (!bridge.get()) {
LOG(WARNING)
- << "ModelTypeService destroyed before debug info was retrieved.";
+ << "ModelTypeSyncBridge destroyed before debug info was retrieved.";
return nullptr;
}
SharedModelTypeProcessor* processor =
- static_cast<SharedModelTypeProcessor*>(service->change_processor());
+ static_cast<SharedModelTypeProcessor*>(bridge->change_processor());
if (!processor) {
LOG(WARNING) << "SharedModelTypeProcessor destroyed before debug info was "
"retrieved.";
@@ -34,21 +37,21 @@ SharedModelTypeProcessor* GetProcessorFromService(
// static
void ModelTypeDebugInfo::GetAllNodes(
- const base::WeakPtr<ModelTypeService>& service,
+ const base::WeakPtr<ModelTypeSyncBridge>& bridge,
const base::Callback<void(const ModelType,
std::unique_ptr<base::ListValue>)>& callback) {
- SharedModelTypeProcessor* processor = GetProcessorFromService(service);
+ SharedModelTypeProcessor* processor = GetProcessorFromBridge(bridge);
if (processor) {
- service->GetAllData(base::Bind(&ModelTypeDebugInfo::MergeDataWithMetadata,
- base::Unretained(processor), callback));
+ bridge->GetAllData(base::Bind(&ModelTypeDebugInfo::MergeDataWithMetadata,
+ base::Unretained(processor), callback));
}
}
// static
void ModelTypeDebugInfo::GetStatusCounters(
- const base::WeakPtr<ModelTypeService>& service,
+ const base::WeakPtr<ModelTypeSyncBridge>& bridge,
const base::Callback<void(ModelType, const StatusCounters&)>& callback) {
- SharedModelTypeProcessor* processor = GetProcessorFromService(service);
+ SharedModelTypeProcessor* processor = GetProcessorFromBridge(bridge);
if (processor) {
syncer::StatusCounters counters;
counters.num_entries_and_tombstones = processor->entities_.size();
« no previous file with comments | « components/sync/model/model_type_debug_info.h ('k') | components/sync/model/model_type_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698