diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 23:44:20 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 23:44:20 +0000 |
commit | f5f2a3cc88d1bdde78c56ab60ac154c6bba9cb79 (patch) | |
tree | 2d1836c265e7b27aae8b85110959836d926daf85 /jingle | |
parent | ebc23d2a9540ff9dafab4f029bca31b99310d62d (diff) | |
download | chromium_src-f5f2a3cc88d1bdde78c56ab60ac154c6bba9cb79.zip chromium_src-f5f2a3cc88d1bdde78c56ab60ac154c6bba9cb79.tar.gz chromium_src-f5f2a3cc88d1bdde78c56ab60ac154c6bba9cb79.tar.bz2 |
[Sync] Removed unused notification methods, renamed 'transitional' to 'p2p'
BUG=None
TEST=Existing integration tests
Review URL: http://codereview.chromium.org/4264003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r-- | jingle/notifier/base/notification_method.cc | 18 | ||||
-rw-r--r-- | jingle/notifier/base/notification_method.h | 47 | ||||
-rw-r--r-- | jingle/notifier/listener/send_update_task.cc | 1 | ||||
-rw-r--r-- | jingle/notifier/listener/subscribe_task.h | 3 |
4 files changed, 11 insertions, 58 deletions
diff --git a/jingle/notifier/base/notification_method.cc b/jingle/notifier/base/notification_method.cc index 08feb4a..6095ed0 100644 --- a/jingle/notifier/base/notification_method.cc +++ b/jingle/notifier/base/notification_method.cc @@ -13,14 +13,8 @@ const NotificationMethod kDefaultNotificationMethod = NOTIFICATION_SERVER; std::string NotificationMethodToString( NotificationMethod notification_method) { switch (notification_method) { - case NOTIFICATION_LEGACY: - return "NOTIFICATION_LEGACY"; - break; - case NOTIFICATION_TRANSITIONAL: - return "NOTIFICATION_TRANSITIONAL"; - break; - case NOTIFICATION_NEW: - return "NOTIFICATION_NEW"; + case NOTIFICATION_P2P: + return "NOTIFICATION_P2P"; break; case NOTIFICATION_SERVER: return "NOTIFICATION_SERVER"; @@ -34,12 +28,8 @@ std::string NotificationMethodToString( } NotificationMethod StringToNotificationMethod(const std::string& str) { - if (str == "legacy") { - return NOTIFICATION_LEGACY; - } else if (str == "transitional") { - return NOTIFICATION_TRANSITIONAL; - } else if (str == "new") { - return NOTIFICATION_NEW; + if (str == "p2p") { + return NOTIFICATION_P2P; } else if (str == "server") { return NOTIFICATION_SERVER; } diff --git a/jingle/notifier/base/notification_method.h b/jingle/notifier/base/notification_method.h index aedc11d..8c7c181 100644 --- a/jingle/notifier/base/notification_method.h +++ b/jingle/notifier/base/notification_method.h @@ -10,46 +10,11 @@ namespace notifier { -// This is the matrix for the interaction between clients with -// different notification methods (except for NOTIFICATION_SERVER): -// -// Listen -// L T N -// +-------+ -// L | E E E | -// Send T | Y Y Y | -// N | E Y Y | -// +-------+ -// -// 'Y' means a client listening with the column notification method -// will receive notifications from a client sending with the row -// notification method. 'E' means means that the notification will be -// an empty one, which may be dropped by the server in the future. -// -// As for NOTIFICATION_SERVER, server-issued notifications will also -// simulate a peer-issued notification, so that any client with -// NOTIFICATION_TRANSITIONAL or NOTIFICATION_NEW will be able to -// receive those, too. This support will be removed once everyone is -// on NOTIFICATION_SERVER. - enum NotificationMethod { - // Old, broken notification method. Works only if notification - // servers don't drop empty notifications. - NOTIFICATION_LEGACY, - // Compatible with new notifications. Also compatible with legacy - // notifications if the notification servers don't drop empty - // notifications. - NOTIFICATION_TRANSITIONAL, - // New notification method. Compatible only with transitional - // notifications. - // - // NOTE: "New" is kind of a misnomer, as it refers only to - // peer-issued notifications; the plan is to migrate everyone to - // using NOTIFICATION_SERVER. - NOTIFICATION_NEW, - - // Server-issued notifications. Compatible only with transitional - // notifications. + // Old peer-to-peer notification method. Currently only used for + // testing. + NOTIFICATION_P2P, + // Server-issued notifications. The default. NOTIFICATION_SERVER, }; @@ -58,8 +23,8 @@ extern const NotificationMethod kDefaultNotificationMethod; std::string NotificationMethodToString( NotificationMethod notification_method); -// If the given string is not one of "legacy", "transitional", "new", -// or "server", returns kDefaultNotificationMethod. +// If the given string is not one of "p2p" or "server", returns +// kDefaultNotificationMethod. NotificationMethod StringToNotificationMethod(const std::string& str); } // namespace notifier diff --git a/jingle/notifier/listener/send_update_task.cc b/jingle/notifier/listener/send_update_task.cc index 4e34c7d..313b63f 100644 --- a/jingle/notifier/listener/send_update_task.cc +++ b/jingle/notifier/listener/send_update_task.cc @@ -90,7 +90,6 @@ buzz::XmlElement* SendUpdateTask::MakeUpdateMessage( // <Content> // <Priority int="{Priority}" /> // <RequireSubscription bool="{true/false}" /> - // <!-- If is_transitional is set, this is omitted. --> // <ServiceSpecificData data="{ServiceData}" /> // <WriteToCacheOnly bool="{true/false}" /> // </Content> diff --git a/jingle/notifier/listener/subscribe_task.h b/jingle/notifier/listener/subscribe_task.h index f2888d7..857b921 100644 --- a/jingle/notifier/listener/subscribe_task.h +++ b/jingle/notifier/listener/subscribe_task.h @@ -17,8 +17,7 @@ #include "talk/xmpp/xmpptask.h" namespace notifier { -// TODO(akalin): Remove NOTIFICATION_LEGACY and remove/refactor relevant code -// in this class and any other class that uses notification_method. + class SubscribeTask : public buzz::XmppTask { public: SubscribeTask(TaskParent* parent, |