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

Unified Diff: components/sync/api/data_type_error_handler_impl.cc

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. 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
Index: components/sync/api/data_type_error_handler_impl.cc
diff --git a/components/sync/api/data_type_error_handler_impl.cc b/components/sync/api/data_type_error_handler_impl.cc
deleted file mode 100644
index e856cc12d11115cb3af548e3c8b3ca7e678f1dab..0000000000000000000000000000000000000000
--- a/components/sync/api/data_type_error_handler_impl.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/sync/api/data_type_error_handler_impl.h"
-
-#include "base/bind.h"
-#include "base/metrics/histogram.h"
-
-namespace syncer {
-
-DataTypeErrorHandlerImpl::DataTypeErrorHandlerImpl(
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- const base::Closure& dump_stack,
- const ErrorCallback& sync_callback)
- : ui_thread_(ui_thread),
- dump_stack_(dump_stack),
- sync_callback_(sync_callback) {}
-
-DataTypeErrorHandlerImpl::~DataTypeErrorHandlerImpl() {}
-
-void DataTypeErrorHandlerImpl::OnUnrecoverableError(const SyncError& error) {
- if (!dump_stack_.is_null())
- dump_stack_.Run();
- UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeRunFailures",
- ModelTypeToHistogramInt(error.model_type()),
- MODEL_TYPE_COUNT);
- ui_thread_->PostTask(error.location(), base::Bind(sync_callback_, error));
-}
-
-SyncError DataTypeErrorHandlerImpl::CreateAndUploadError(
- const tracked_objects::Location& location,
- const std::string& message,
- ModelType type) {
- if (!dump_stack_.is_null())
- dump_stack_.Run();
- return SyncError(location, SyncError::DATATYPE_ERROR, message, type);
-}
-
-std::unique_ptr<DataTypeErrorHandler> DataTypeErrorHandlerImpl::Copy() const {
- return base::MakeUnique<DataTypeErrorHandlerImpl>(ui_thread_, dump_stack_,
- sync_callback_);
-}
-
-} // namespace syncer
« no previous file with comments | « components/sync/api/data_type_error_handler_impl.h ('k') | components/sync/api/data_type_error_handler_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698