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

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

Issue 2935583002: [Sync] Implement support for untracking new entities (Closed)
Patch Set: add comments Created 3 years, 6 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 e7d4e2b13bb19809057766d8c14d4d5343f9cbb3..bdc6959ff6887e08059abd526392eca1a05d8674 100644
--- a/components/sync/model/fake_model_type_sync_bridge.h
+++ b/components/sync/model/fake_model_type_sync_bridge.h
@@ -8,6 +8,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_set>
#include "base/optional.h"
#include "components/sync/engine/non_blocking_sync_common.h"
@@ -132,6 +133,9 @@ class FakeModelTypeSyncBridge : public ModelTypeSyncBridge {
// test code here, this function is needed to manually copy it.
static std::unique_ptr<EntityData> CopyEntityData(const EntityData& old_data);
+ // Set storage key which will be ignored by bridge.
+ void SetKeyToIgnore(const std::string key);
+
const Store& db() { return *db_; }
protected:
@@ -147,6 +151,9 @@ class FakeModelTypeSyncBridge : public ModelTypeSyncBridge {
// The conflict resolution to use for calls to ResolveConflict.
std::unique_ptr<ConflictResolution> conflict_resolution_;
+ // The storage keys which bridge will ignore.
+ std::unordered_set<std::string> keys_to_ignore_;
+
// Whether an error should be produced on the next bridge call.
bool error_next_ = false;
« no previous file with comments | « components/sync/model/fake_model_type_change_processor.cc ('k') | components/sync/model/fake_model_type_sync_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698