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

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

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__ 5 #ifndef COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__
6 #define COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__ 6 #define COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "components/sync/api/sync_error.h" 13 #include "components/sync/api/sync_error.h"
14 #include "components/sync/base/model_type.h" 14 #include "components/sync/base/model_type.h"
15 15
16 namespace syncer { 16 namespace syncer {
17 17
18 class DataTypeErrorHandler { 18 class DataTypeErrorHandler {
19 public: 19 public:
20 typedef base::Callback<void(const SyncError&)> ErrorCallback; 20 typedef base::Callback<void(const syncer::SyncError&)> ErrorCallback;
21 21
22 virtual ~DataTypeErrorHandler() {} 22 virtual ~DataTypeErrorHandler() {}
23 23
24 // Call this to disable a datatype while it is running. This is usually 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. 25 // called for a runtime failure that is specific to a datatype.
26 virtual void OnUnrecoverableError(const SyncError& error) = 0; 26 virtual void OnUnrecoverableError(const SyncError& error) = 0;
27 27
28 // This will create a SyncError object. This will also upload a breakpad call 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 29 // stack to crash server. A sync error usually means that sync has to be
30 // disabled either for that type or completely. 30 // disabled either for that type or completely.
31 virtual SyncError CreateAndUploadError( 31 virtual SyncError CreateAndUploadError(
32 const tracked_objects::Location& location, 32 const tracked_objects::Location& location,
33 const std::string& message, 33 const std::string& message,
34 ModelType type) = 0; 34 ModelType type) = 0;
35 35
36 // Create a copy of this error handler. 36 // Create a copy of this error handler.
37 virtual std::unique_ptr<DataTypeErrorHandler> Copy() const = 0; 37 virtual std::unique_ptr<DataTypeErrorHandler> Copy() const = 0;
38 }; 38 };
39 39
40 } // namespace syncer 40 } // namespace syncer
41 41
42 #endif // COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_H__ 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