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

Unified Diff: chrome/browser/sync/notification_method.h

Issue 2827014: Implemented initial version of server-issued notification client. (Closed)
Patch Set: Added DEPS Created 10 years, 6 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 | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/notification_method.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notification_method.h
diff --git a/chrome/browser/sync/notification_method.h b/chrome/browser/sync/notification_method.h
index 569f8d25eb5d2ef5ece6dac5e8f96c5ef9ab1729..4e1bcd1682dd9f6ebf8c3fba8b9f6123a03bf12f 100644
--- a/chrome/browser/sync/notification_method.h
+++ b/chrome/browser/sync/notification_method.h
@@ -10,7 +10,7 @@
namespace browser_sync {
// This is the matrix for the interaction between clients with
-// different notification methods:
+// different notification methods (except for NOTIFICATION_SERVER):
//
// Listen
// L T N
@@ -24,6 +24,12 @@ namespace browser_sync {
// 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
@@ -33,9 +39,17 @@ enum NotificationMethod {
// notifications if the notification servers don't drop empty
// notifications.
NOTIFICATION_TRANSITIONAL,
- // New, ideal notification method. Compatible only with
- // transitional notifications.
+ // 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.
+ NOTIFICATION_SERVER,
};
extern const NotificationMethod kDefaultNotificationMethod;
@@ -43,8 +57,8 @@ extern const NotificationMethod kDefaultNotificationMethod;
std::string NotificationMethodToString(
NotificationMethod notification_method);
-// If the given string is not one of "legacy", "transitional", or
-// "new", returns kDefaultNotificationMethod.
+// If the given string is not one of "legacy", "transitional", "new",
+// or "server", returns kDefaultNotificationMethod.
NotificationMethod StringToNotificationMethod(const std::string& str);
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/notification_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698