blob: a61c89b5e06d834f26692e76126beb8b08c1340f [file] [log] [blame]
[email protected]1bfd03f2011-07-02 19:04:181// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]85164712010-06-23 01:13:562// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// Various utilities for dealing with invalidation data types.
6
7#ifndef CHROME_BROWSER_SYNC_NOTIFIER_INVALIDATION_UTIL_H_
8#define CHROME_BROWSER_SYNC_NOTIFIER_INVALIDATION_UTIL_H_
[email protected]32b76ef2010-07-26 23:08:249#pragma once
[email protected]85164712010-06-23 01:13:5610
11#include <string>
12
[email protected]6a1d0f52010-06-30 05:11:5313#include "chrome/browser/sync/syncable/model_type.h"
[email protected]1bfd03f2011-07-02 19:04:1814#include "google/cacheinvalidation/callback.h"
[email protected]d49f46332011-07-15 21:31:0715
16namespace invalidation {
17
18class Invalidation;
19class ObjectId;
20
21} // namespace invalidation
[email protected]85164712010-06-23 01:13:5622
23namespace sync_notifier {
24
25void RunAndDeleteClosure(invalidation::Closure* task);
26
[email protected]6a1d0f52010-06-30 05:11:5327bool RealModelTypeToObjectId(syncable::ModelType model_type,
28 invalidation::ObjectId* object_id);
29
30bool ObjectIdToRealModelType(const invalidation::ObjectId& object_id,
31 syncable::ModelType* model_type);
32
[email protected]85164712010-06-23 01:13:5633std::string ObjectIdToString(const invalidation::ObjectId& object_id);
34
[email protected]85164712010-06-23 01:13:5635std::string InvalidationToString(
36 const invalidation::Invalidation& invalidation);
37
[email protected]85164712010-06-23 01:13:5638} // namespace sync_notifier
39
40#endif // CHROME_BROWSER_SYNC_NOTIFIER_INVALIDATION_UTIL_H_