Revert 215542 "[Telemetry] Add HTML output and make it the default."
[chromium-blink-merge.git] / sync / notifier / object_id_invalidation_map.h
blob0a6a95ede442c3da3b748d900f11cdc83182ef4c
1 // Copyright 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.
5 #ifndef SYNC_NOTIFIER_OBJECT_ID_INVALIDATION_MAP_H_
6 #define SYNC_NOTIFIER_OBJECT_ID_INVALIDATION_MAP_H_
8 #include <map>
9 #include <string>
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "google/cacheinvalidation/include/types.h"
14 #include "sync/base/sync_export.h"
15 #include "sync/internal_api/public/base/invalidation.h"
16 #include "sync/internal_api/public/base/model_type_invalidation_map.h"
17 #include "sync/notifier/invalidation_util.h"
19 namespace base {
20 class ListValue;
21 } // namespace base
23 namespace syncer {
25 typedef std::map<invalidation::ObjectId,
26 Invalidation,
27 ObjectIdLessThan> ObjectIdInvalidationMap;
29 // Converts between ObjectIdInvalidationMaps and ObjectIdSets.
30 ObjectIdSet ObjectIdInvalidationMapToSet(
31 const ObjectIdInvalidationMap& invalidation_map);
32 SYNC_EXPORT ObjectIdInvalidationMap ObjectIdSetToInvalidationMap(
33 const ObjectIdSet& ids, int64 version, const std::string& payload);
35 SYNC_EXPORT bool ObjectIdInvalidationMapEquals(
36 const ObjectIdInvalidationMap& invalidation_map1,
37 const ObjectIdInvalidationMap& invalidation_map2);
39 scoped_ptr<base::ListValue> ObjectIdInvalidationMapToValue(
40 const ObjectIdInvalidationMap& invalidation_map);
42 bool ObjectIdInvalidationMapFromValue(const base::ListValue& value,
43 ObjectIdInvalidationMap* out);
45 // Converts between ObjectIdInvalidationMaps and ModelTypeInvalidationMaps.
46 SYNC_EXPORT_PRIVATE ModelTypeInvalidationMap
47 ObjectIdInvalidationMapToModelTypeInvalidationMap(
48 const ObjectIdInvalidationMap& invalidation_map);
49 SYNC_EXPORT ObjectIdInvalidationMap
50 ModelTypeInvalidationMapToObjectIdInvalidationMap(
51 const ModelTypeInvalidationMap& invalidation_map);
53 } // namespace syncer
55 #endif // SYNC_NOTIFIER_OBJECT_ID_INVALIDATION_MAP_H_