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

Unified Diff: sync/notifier/fake_invalidator.h

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 4 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
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/notifier/fake_invalidator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/fake_invalidator.h
diff --git a/sync/notifier/fake_invalidator.h b/sync/notifier/fake_invalidator.h
index 26c5ad857eb836d7771a552c9d64f037e3caaf22..07690ddf685fd64e0b97d57c5648e59b6070655c 100644
--- a/sync/notifier/fake_invalidator.h
+++ b/sync/notifier/fake_invalidator.h
@@ -25,7 +25,12 @@ class FakeInvalidator : public Invalidator {
const std::string& GetStateDeprecated() const;
const std::string& GetCredentialsEmail() const;
const std::string& GetCredentialsToken() const;
- ModelTypeSet GetLastChangedTypes() const;
+ const ObjectIdStateMap& GetLastSentIdStateMap() const;
+
+ void EmitOnNotificationsEnabled();
+ void EmitOnIncomingNotification(const ObjectIdStateMap& id_state_map,
+ IncomingNotificationSource source);
+ void EmitOnNotificationsDisabled(NotificationsDisabledReason reason);
virtual void RegisterHandler(InvalidationHandler* handler) OVERRIDE;
virtual void UpdateRegisteredIds(InvalidationHandler* handler,
@@ -35,7 +40,7 @@ class FakeInvalidator : public Invalidator {
virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
virtual void UpdateCredentials(
const std::string& email, const std::string& token) OVERRIDE;
- virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE;
+ virtual void SendNotification(const ObjectIdStateMap& id_state_map) OVERRIDE;
private:
InvalidatorRegistrar registrar_;
@@ -43,7 +48,7 @@ class FakeInvalidator : public Invalidator {
std::string state_;
std::string email_;
std::string token_;
- ModelTypeSet last_changed_types_;
+ ObjectIdStateMap last_sent_id_state_map_;
};
} // namespace syncer
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/notifier/fake_invalidator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698