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

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

Issue 2864713002: [USS] Add function for update storage key for processor (Closed)
Patch Set: Created 3 years, 7 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_sync_bridge.h
diff --git a/components/sync/model/fake_model_type_sync_bridge.h b/components/sync/model/fake_model_type_sync_bridge.h
index 07759719e5eecce3dc27a052bd0e4155bb04ef47..8b8753a0cffdd73f8ef227540055256738487d8d 100644
--- a/components/sync/model/fake_model_type_sync_bridge.h
+++ b/components/sync/model/fake_model_type_sync_bridge.h
@@ -125,21 +125,26 @@ class FakeModelTypeSyncBridge : public ModelTypeSyncBridge {
// Sets an error that the next fallible call to the bridge will generate.
void ErrorOnNextCall();
+ // It is intentionally very difficult to copy an EntityData, as in normal code
+ // we never want to. However, since we store the data as an EntityData for the
+ // test code here, this function is needed to manually copy it.
+ static std::unique_ptr<EntityData> CopyEntityData(const EntityData& old_data);
+
const Store& db() { return *db_; }
protected:
- // Contains all of the data and metadata state.
- std::unique_ptr<Store> db_;
-
- private:
// Applies |change_list| to the metadata store.
void ApplyMetadataChangeList(std::unique_ptr<MetadataChangeList> change_list);
- // The conflict resolution to use for calls to ResolveConflict.
- std::unique_ptr<ConflictResolution> conflict_resolution_;
+ // Contains all of the data and metadata state.
+ std::unique_ptr<Store> db_;
// Whether an error should be produced on the next bridge call.
bool error_next_ = false;
+
+ private:
+ // The conflict resolution to use for calls to ResolveConflict.
+ std::unique_ptr<ConflictResolution> conflict_resolution_;
};
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698