summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/notifier/cache_invalidation_packet_handler.h')
-rw-r--r--chrome/browser/sync/notifier/cache_invalidation_packet_handler.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h
index 3c3bfec..16e86ff 100644
--- a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h
+++ b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h
@@ -12,7 +12,11 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/gtest_prod_util.h"
+#include "base/non_thread_safe.h"
#include "base/scoped_callback_factory.h"
+#include "base/scoped_ptr.h"
#include "base/weak_ptr.h"
#include "talk/xmpp/jid.h"
@@ -27,8 +31,6 @@ class Task;
namespace sync_notifier {
-// TODO(akalin): Add a NonThreadSafe member to this class and use it.
-
class CacheInvalidationPacketHandler {
public:
// Starts routing packets from |invalidation_client| using
@@ -45,13 +47,18 @@ class CacheInvalidationPacketHandler {
~CacheInvalidationPacketHandler();
private:
+ FRIEND_TEST(CacheInvalidationPacketHandlerTest, Basic);
+
void HandleOutboundPacket(
invalidation::NetworkEndpoint* const& network_endpoint);
void HandleInboundPacket(const std::string& packet);
+ NonThreadSafe non_thread_safe_;
base::ScopedCallbackFactory<CacheInvalidationPacketHandler>
scoped_callback_factory_;
+ scoped_ptr<CallbackRunner<Tuple1<invalidation::NetworkEndpoint* const&> > >
+ handle_outbound_packet_callback_;
base::WeakPtr<talk_base::Task> base_task_;
invalidation::InvalidationClient* invalidation_client_;