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

Side by Side Diff: sync/notifier/object_id_state_map.h

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/notifier/object_id_payload_map.cc ('k') | sync/notifier/object_id_state_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SYNC_NOTIFIER_OBJECT_ID_STATE_MAP_H_
6 #define SYNC_NOTIFIER_OBJECT_ID_STATE_MAP_H_
7
8 #include <map>
9 #include <string>
10
11 #include "google/cacheinvalidation/include/types.h"
12 #include "sync/internal_api/public/base/invalidation_state.h"
13 #include "sync/internal_api/public/base/model_type_state_map.h"
14 #include "sync/notifier/invalidation_util.h"
15
16 namespace syncer {
17
18 typedef std::map<invalidation::ObjectId,
19 InvalidationState,
20 ObjectIdLessThan> ObjectIdStateMap;
21
22 // Converts between ObjectIdStateMaps and ObjectIdSets.
23 ObjectIdSet ObjectIdStateMapToSet(const ObjectIdStateMap& id_payloads);
24 ObjectIdStateMap ObjectIdSetToStateMap(const ObjectIdSet& ids,
25 const std::string& payload);
26
27 // Converts between ObjectIdStateMaps and ModelTypeStateMaps.
28 ModelTypeStateMap ObjectIdStateMapToModelTypeStateMap(
29 const ObjectIdStateMap& id_payloads);
30 ObjectIdStateMap ModelTypeStateMapToObjectIdStateMap(
31 const ModelTypeStateMap& type_payloads);
32
33 } // namespace syncer
34
35 #endif // HOME_DCHENG_SRC_CHROMIUM_SRC_SYNC_NOTIFIER_OBJECT_ID_STATE_MAP_H_
OLDNEW
« no previous file with comments | « sync/notifier/object_id_payload_map.cc ('k') | sync/notifier/object_id_state_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698