[email protected] | 8516471 | 2010-06-23 01:13:56 | [diff] [blame^] | 1 | // 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 | |
| 14 | namespace sync_notifier { |
| 15 | |
| 16 | void 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 | |
| 21 | std::string ObjectIdToString(const invalidation::ObjectId& object_id); |
| 22 | |
| 23 | std::string StatusToString(const invalidation::Status& status); |
| 24 | |
| 25 | std::string InvalidationToString( |
| 26 | const invalidation::Invalidation& invalidation); |
| 27 | |
| 28 | std::string RegistrationUpdateToString( |
| 29 | const invalidation::RegistrationUpdate& update); |
| 30 | |
| 31 | std::string RegistrationUpdateResultToString( |
| 32 | const invalidation::RegistrationUpdateResult& update_result); |
| 33 | |
| 34 | } // namespace sync_notifier |
| 35 | |
| 36 | #endif // CHROME_BROWSER_SYNC_NOTIFIER_INVALIDATION_UTIL_H_ |