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

Unified Diff: components/sync/driver/change_processor.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/driver/change_processor.h
diff --git a/components/sync/driver/change_processor.h b/components/sync/driver/change_processor.h
index 401e528dd874a84fb9dfa80a7b9cd3a70ae599c8..b80fa0bbb65f6aac7ccf14d7bd2fc1776157b175 100644
--- a/components/sync/driver/change_processor.h
+++ b/components/sync/driver/change_processor.h
@@ -7,13 +7,15 @@
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
+#include "components/sync/api/data_type_error_handler.h"
#include "components/sync/core/base_transaction.h"
#include "components/sync/core/change_record.h"
#include "components/sync/core/user_share.h"
namespace syncer {
-class DataTypeErrorHandler;
class UnrecoverableErrorHandler;
} // namespace syncer
@@ -25,7 +27,8 @@ class ModelAssociator;
// native model. This does not currently distinguish between model data types.
class ChangeProcessor {
public:
- explicit ChangeProcessor(syncer::DataTypeErrorHandler* error_handler);
+ explicit ChangeProcessor(
+ std::unique_ptr<syncer::DataTypeErrorHandler> error_handler);
virtual ~ChangeProcessor();
// Call when the processor should accept changes from either provided model
@@ -60,7 +63,7 @@ class ChangeProcessor {
virtual syncer::UserShare* share_handle() const;
private:
- syncer::DataTypeErrorHandler* error_handler_; // Guaranteed to outlive us.
+ std::unique_ptr<syncer::DataTypeErrorHandler> error_handler_;
// The sync model we are processing changes from.
syncer::UserShare* share_handle_;
« no previous file with comments | « components/sync/device_info/device_info_service_unittest.cc ('k') | components/sync/driver/change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698