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

Unified Diff: components/sync/model/fake_model_type_change_processor.h

Issue 2618483003: [Sync] Introduce ModelError for USS error handling. (Closed)
Patch Set: Address comments. Created 3 years, 11 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/model/fake_model_type_change_processor.h
diff --git a/components/sync/model/fake_model_type_change_processor.h b/components/sync/model/fake_model_type_change_processor.h
index bee92efbfecc1bdb5910be15e4f17278abb414be..3463ec07f0f5033ad528cc68c1ec705991424149 100644
--- a/components/sync/model/fake_model_type_change_processor.h
+++ b/components/sync/model/fake_model_type_change_processor.h
@@ -10,6 +10,7 @@
#include "components/sync/base/model_type.h"
#include "components/sync/model/metadata_change_list.h"
+#include "components/sync/model/model_error.h"
#include "components/sync/model/model_type_change_processor.h"
namespace syncer {
@@ -32,14 +33,21 @@ class FakeModelTypeChangeProcessor : public ModelTypeChangeProcessor {
MetadataChangeList* metadata_change_list) override;
void Delete(const std::string& client_tag,
MetadataChangeList* metadata_change_list) override;
- void OnMetadataLoaded(SyncError error,
- std::unique_ptr<MetadataBatch> batch) override;
+ void OnMetadataLoaded(std::unique_ptr<MetadataBatch> batch) override;
void OnSyncStarting(std::unique_ptr<DataTypeErrorHandler> error_handler,
const StartCallback& callback) override;
void DisableSync() override;
bool IsTrackingMetadata() override;
- SyncError CreateAndUploadError(const tracked_objects::Location& location,
- const std::string& message) override;
+ void ReportError(const ModelError& error) override;
+ void ReportError(const tracked_objects::Location& location,
+ const std::string& message) override;
+
+ // Indicates that ReportError should be called in the future.
+ void ExpectError();
+
+ private:
+ // Whether we expect ReportError to be called.
+ bool expect_error_ = false;
};
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698