blob: 3ca5fe9d9856e15a007b38b576b6d79f8180ddcf [file] [log] [blame]
[email protected]85164712010-06-23 01:13:561// Copyright (c) 2010 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// 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_
9
10#include <string>
11
12#include "google/cacheinvalidation/invalidation-client.h"
13
14namespace sync_notifier {
15
16void RunAndDeleteClosure(invalidation::Closure* task);
17
18// We need to write our own protobuf-to-string functions because we
19// use LITE_RUNTIME, which doesn't support DebugString().
20
21std::string ObjectIdToString(const invalidation::ObjectId& object_id);
22
23std::string StatusToString(const invalidation::Status& status);
24
25std::string InvalidationToString(
26 const invalidation::Invalidation& invalidation);
27
28std::string RegistrationUpdateToString(
29 const invalidation::RegistrationUpdate& update);
30
31std::string RegistrationUpdateResultToString(
32 const invalidation::RegistrationUpdateResult& update_result);
33
34} // namespace sync_notifier
35
36#endif // CHROME_BROWSER_SYNC_NOTIFIER_INVALIDATION_UTIL_H_