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

Unified Diff: sync/internal_api/public/base/invalidation.h

Issue 11052007: Rename ModelType/ObjectIdStateMap to InvalidationMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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: sync/internal_api/public/base/invalidation.h
diff --git a/sync/internal_api/public/base/invalidation_state.h b/sync/internal_api/public/base/invalidation.h
similarity index 60%
rename from sync/internal_api/public/base/invalidation_state.h
rename to sync/internal_api/public/base/invalidation.h
index 8c811afda6684e8ccea314011ce5cb5fb7f46898..fc8c361c65086da59befa034ddbfe1c72a7f1764 100644
--- a/sync/internal_api/public/base/invalidation_state.h
+++ b/sync/internal_api/public/base/invalidation.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_
-#define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_
+#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
+#define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
#include <string>
@@ -28,11 +28,16 @@ class AckHandle {
bool ResetFromValue(const base::Value& value);
};
-struct InvalidationState {
+// Represents a local invalidation, and is roughly analogous to
+// invalidation::Invalidation. It contains a payload (which may be empty) and an
+// associated ack handle that an InvalidationHandler implementation can use to
+// acknowledge receipt of the invalidation. It does not embed the object ID,
+// since it is typically associated with it through ObjectIdInvalidationMap.
+struct Invalidation {
std::string payload;
AckHandle ack_handle;
- bool Equals(const InvalidationState& other) const;
+ bool Equals(const Invalidation& other) const;
// Caller owns the returned DictionaryValue.
scoped_ptr<base::DictionaryValue> ToValue() const;
@@ -42,4 +47,4 @@ struct InvalidationState {
} // namespace syncer
-#endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_STATE_H_
+#endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_H_
« no previous file with comments | « sync/internal_api/js_sync_manager_observer_unittest.cc ('k') | sync/internal_api/public/base/invalidation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698