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

Unified Diff: components/sync/api/data_type_error_handler_mock.h

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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_mock.h
diff --git a/components/sync/core/test/data_type_error_handler_mock.h b/components/sync/api/data_type_error_handler_mock.h
similarity index 63%
rename from components/sync/core/test/data_type_error_handler_mock.h
rename to components/sync/api/data_type_error_handler_mock.h
index 557240ed7713712bc83de22c9ea6c97230e60f50..875b19022371251d8b791376adf05f919759911c 100644
--- a/components/sync/core/test/data_type_error_handler_mock.h
+++ b/components/sync/api/data_type_error_handler_mock.h
@@ -2,28 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-#ifndef COMPONENTS_SYNC_CORE_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
-#define COMPONENTS_SYNC_CORE_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
+#ifndef COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__
+#define COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__
+#include <memory>
#include <string>
+#include "components/sync/api/data_type_error_handler.h"
#include "components/sync/base/model_type.h"
-#include "components/sync/core/data_type_error_handler.h"
namespace syncer {
// A mock DataTypeErrorHandler for testing. Set the expected error type with
-// ExpectError and OnSingleDataTypeUnrecoverableError will pass. If the error is
-// not called this object's destructor will DCHECK.
+// ExpectError and OnUnrecoverableError will pass. If the error is not called
+// this object's destructor will DCHECK.
class DataTypeErrorHandlerMock : public DataTypeErrorHandler {
public:
DataTypeErrorHandlerMock();
~DataTypeErrorHandlerMock() override;
- void OnSingleDataTypeUnrecoverableError(const SyncError& error) override;
+ void OnUnrecoverableError(const SyncError& error) override;
SyncError CreateAndUploadError(const tracked_objects::Location& location,
const std::string& message,
ModelType type) override;
+ std::unique_ptr<DataTypeErrorHandler> Copy() const override;
// Set the |error_type| to expect.
void ExpectError(SyncError::ErrorType error_type);
@@ -35,4 +37,4 @@ class DataTypeErrorHandlerMock : public DataTypeErrorHandler {
} // namespace syncer
-#endif // COMPONENTS_SYNC_CORE_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
+#endif // COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__
« no previous file with comments | « components/sync/api/data_type_error_handler_impl.cc ('k') | components/sync/api/data_type_error_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698