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

Side by Side Diff: components/sync/api/data_type_error_handler.h

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 unified diff | Download patch
« no previous file with comments | « components/sync/api/data_batch.h ('k') | components/sync/api/data_type_error_handler_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__
6 #define COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__
7
8 #include <memory>
9 #include <string>
10
11 #include "base/callback.h"
12 #include "base/location.h"
13 #include "components/sync/api/sync_error.h"
14 #include "components/sync/base/model_type.h"
15
16 namespace syncer {
17
18 class DataTypeErrorHandler {
19 public:
20 typedef base::Callback<void(const SyncError&)> ErrorCallback;
21
22 virtual ~DataTypeErrorHandler() {}
23
24 // Call this to disable a datatype while it is running. This is usually
25 // called for a runtime failure that is specific to a datatype.
26 virtual void OnUnrecoverableError(const SyncError& error) = 0;
27
28 // This will create a SyncError object. This will also upload a breakpad call
29 // stack to crash server. A sync error usually means that sync has to be
30 // disabled either for that type or completely.
31 virtual SyncError CreateAndUploadError(
32 const tracked_objects::Location& location,
33 const std::string& message,
34 ModelType type) = 0;
35
36 // Create a copy of this error handler.
37 virtual std::unique_ptr<DataTypeErrorHandler> Copy() const = 0;
38 };
39
40 } // namespace syncer
41
42 #endif // COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__
OLDNEW
« no previous file with comments | « components/sync/api/data_batch.h ('k') | components/sync/api/data_type_error_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698