Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: sync/notifier/cache_invalidation_packet_handler.h

Issue 10436013: [Sync] Make InvalidationNotifier use PushClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/notifier/cache_invalidation_packet_handler.h
diff --git a/sync/notifier/cache_invalidation_packet_handler.h b/sync/notifier/cache_invalidation_packet_handler.h
deleted file mode 100644
index 655933d13696cda7865139c944c960c1cb2ed0f8..0000000000000000000000000000000000000000
--- a/sync/notifier/cache_invalidation_packet_handler.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Class that handles the details of sending and receiving client
-// invalidation packets.
-
-#ifndef SYNC_NOTIFIER_CACHE_INVALIDATION_PACKET_HANDLER_H_
-#define SYNC_NOTIFIER_CACHE_INVALIDATION_PACKET_HANDLER_H_
-#pragma once
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/non_thread_safe.h"
-#include "google/cacheinvalidation/include/system-resources.h"
-#include "jingle/notifier/listener/push_notifications_listen_task.h"
-#include "jingle/notifier/listener/push_notifications_subscribe_task.h"
-
-namespace buzz {
-class XmppTaskParentInterface;
-} // namespace buzz
-
-namespace sync_notifier {
-
-class CacheInvalidationPacketHandler
- : public notifier::PushNotificationsSubscribeTaskDelegate,
- public notifier::PushNotificationsListenTaskDelegate {
- public:
- // Starts routing packets from |invalidation_client| using
- // |base_task|. |base_task.get()| must still be non-NULL.
- // |invalidation_client| must not already be routing packets through
- // something. Does not take ownership of |invalidation_client|.
- CacheInvalidationPacketHandler(
- base::WeakPtr<buzz::XmppTaskParentInterface> base_task);
-
- // Makes the invalidation client passed into the constructor not
- // route packets through the XMPP client passed into the constructor
- // anymore.
- virtual ~CacheInvalidationPacketHandler();
-
- // If |base_task| is non-NULL, sends the outgoing message.
- virtual void SendMessage(const std::string& outgoing_message);
-
- virtual void SetMessageReceiver(
- invalidation::MessageCallback* incoming_receiver);
-
- // Sends a message requesting a subscription to the notification channel.
- virtual void SendSubscriptionRequest();
-
- // PushNotificationsSubscribeTaskDelegate implementation.
- virtual void OnSubscribed() OVERRIDE;
- virtual void OnSubscriptionError() OVERRIDE;
-
- // PushNotificationsListenTaskDelegate implementation.
- virtual void OnNotificationReceived(
- const notifier::Notification& notification) OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(CacheInvalidationPacketHandlerTest, Basic);
-
- base::NonThreadSafe non_thread_safe_;
- base::WeakPtrFactory<CacheInvalidationPacketHandler> weak_factory_;
-
- base::WeakPtr<buzz::XmppTaskParentInterface> base_task_;
-
- scoped_ptr<invalidation::MessageCallback> incoming_receiver_;
-
- // Parameters for sent messages.
-
- // Monotonically increasing sequence number.
- int seq_;
- // Service context.
- std::string service_context_;
- // Scheduling hash.
- int64 scheduling_hash_;
-
- DISALLOW_COPY_AND_ASSIGN(CacheInvalidationPacketHandler);
-};
-
-} // namespace sync_notifier
-
-#endif // SYNC_NOTIFIER_CACHE_INVALIDATION_PACKET_HANDLER_H_
« no previous file with comments | « jingle/notifier/listener/push_client_unittest.cc ('k') | sync/notifier/cache_invalidation_packet_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698