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

Unified Diff: sync/internal_api/public/data_type_error_handler.h

Issue 1966023002: [Sync] Move DataTypeErrorHandler to //sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Found an unsaved buffer :( Created 4 years, 7 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 | « sync/BUILD.gn ('k') | sync/internal_api/public/test/data_type_error_handler_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/data_type_error_handler.h
diff --git a/sync/internal_api/public/data_type_error_handler.h b/sync/internal_api/public/data_type_error_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7385ca711f66f1c0984b8259915baa74e923374
--- /dev/null
+++ b/sync/internal_api/public/data_type_error_handler.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__
+#define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__
+
+#include <string>
+#include "base/location.h"
+
+#include "sync/api/sync_error.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
+
+namespace syncer {
+
+class DataTypeErrorHandler {
+ public:
+ // Call this to disable a datatype while it is running. This is usually
+ // called for a runtime failure that is specific to a datatype.
+ virtual void OnSingleDataTypeUnrecoverableError(const SyncError& error) = 0;
+
+ // This will create a SyncError object. This will also upload a breakpad call
+ // stack to crash server. A sync error usually means that sync has to be
+ // disabled either for that type or completely.
+ virtual SyncError CreateAndUploadError(
+ const tracked_objects::Location& location,
+ const std::string& message,
+ ModelType type) = 0;
+
+ protected:
+ virtual ~DataTypeErrorHandler() {}
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__
« no previous file with comments | « sync/BUILD.gn ('k') | sync/internal_api/public/test/data_type_error_handler_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698