OLD | NEW |
| (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 SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__ | |
6 #define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__ | |
7 | |
8 #include <string> | |
9 #include "base/location.h" | |
10 | |
11 #include "sync/api/sync_error.h" | |
12 #include "sync/internal_api/public/base/model_type.h" | |
13 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | |
14 | |
15 namespace syncer { | |
16 | |
17 class DataTypeErrorHandler { | |
18 public: | |
19 // Call this to disable a datatype while it is running. This is usually | |
20 // called for a runtime failure that is specific to a datatype. | |
21 virtual void OnSingleDataTypeUnrecoverableError(const SyncError& error) = 0; | |
22 | |
23 // This will create a SyncError object. This will also upload a breakpad call | |
24 // stack to crash server. A sync error usually means that sync has to be | |
25 // disabled either for that type or completely. | |
26 virtual SyncError CreateAndUploadError( | |
27 const tracked_objects::Location& location, | |
28 const std::string& message, | |
29 ModelType type) = 0; | |
30 | |
31 protected: | |
32 virtual ~DataTypeErrorHandler() {} | |
33 }; | |
34 | |
35 } // namespace syncer | |
36 | |
37 #endif // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ERROR_HANDLER_H__ | |
OLD | NEW |