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

Unified Diff: jingle/notifier/listener/notification_defines.cc

Issue 10388227: Revert 138216 - [Sync] Turn notifier::PushClient into an interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « jingle/notifier/listener/notification_defines.h ('k') | jingle/notifier/listener/push_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/listener/notification_defines.cc
===================================================================
--- jingle/notifier/listener/notification_defines.cc (revision 138220)
+++ jingle/notifier/listener/notification_defines.cc (working copy)
@@ -4,61 +4,11 @@
#include "jingle/notifier/listener/notification_defines.h"
-#include <cstddef>
-
namespace notifier {
-Subscription::Subscription() {}
-Subscription::~Subscription() {}
-
-bool Subscription::Equals(const Subscription& other) const {
- return channel == other.channel && from == other.from;
-}
-
-namespace {
-
-template <typename T>
-bool ListsEqual(const T& t1, const T& t2) {
- if (t1.size() != t2.size()) {
- return false;
- }
- for (size_t i = 0; i < t1.size(); ++i) {
- if (!t1[i].Equals(t2[i])) {
- return false;
- }
- }
- return true;
-}
-
-} // namespace
-
-bool SubscriptionListsEqual(const SubscriptionList& subscriptions1,
- const SubscriptionList& subscriptions2) {
- return ListsEqual(subscriptions1, subscriptions2);
-}
-
-Recipient::Recipient() {}
-Recipient::~Recipient() {}
-
-bool Recipient::Equals(const Recipient& other) const {
- return to == other.to && user_specific_data == other.user_specific_data;
-}
-
-bool RecipientListsEqual(const RecipientList& recipients1,
- const RecipientList& recipients2) {
- return ListsEqual(recipients1, recipients2);
-}
-
Notification::Notification() {}
Notification::~Notification() {}
-bool Notification::Equals(const Notification& other) const {
- return
- channel == other.channel &&
- data == other.data &&
- RecipientListsEqual(recipients, other.recipients);
-}
-
std::string Notification::ToString() const {
return "{ channel: \"" + channel + "\", data: \"" + data + "\" }";
}
« no previous file with comments | « jingle/notifier/listener/notification_defines.h ('k') | jingle/notifier/listener/push_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698