Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / sync / internal_api / public / util / experiments.h
index 144687d..18a0887 100644 (file)
@@ -5,29 +5,48 @@
 #ifndef SYNC_UTIL_EXPERIMENTS_
 #define SYNC_UTIL_EXPERIMENTS_
 
+#include <string>
+
 #include "sync/internal_api/public/base/model_type.h"
 
 namespace syncer {
 
-const char kAutofillCullingTag[] = "autofill_culling";
 const char kFaviconSyncTag[] = "favicon_sync";
 const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance";
+const char kGCMChannelTag[] = "gcm_channel";
+const char kEnhancedBookmarksTag[] = "enhanced_bookmarks";
 
 // A structure to hold the enable status of experimental sync features.
 struct Experiments {
-  Experiments() : autofill_culling(false),
-                  favicon_sync_limit(200) {}
+  enum GCMChannelState {
+    UNSET,
+    SUPPRESSED,
+    ENABLED,
+  };
+
+  Experiments()
+      : favicon_sync_limit(200),
+        gcm_channel_state(UNSET),
+        enhanced_bookmarks_enabled(false) {}
 
   bool Matches(const Experiments& rhs) {
-    return (autofill_culling == rhs.autofill_culling &&
-            favicon_sync_limit == rhs.favicon_sync_limit);
+    return (favicon_sync_limit == rhs.favicon_sync_limit &&
+            gcm_channel_state == rhs.gcm_channel_state &&
+            enhanced_bookmarks_enabled == rhs.enhanced_bookmarks_enabled &&
+            enhanced_bookmarks_ext_id == rhs.enhanced_bookmarks_ext_id);
   }
 
-  // Enable deletion of expired autofill entries (if autofill sync is enabled).
-  bool autofill_culling;
-
   // The number of favicons that a client is permitted to sync.
   int favicon_sync_limit;
+
+  // Enable state of the GCM channel.
+  GCMChannelState gcm_channel_state;
+
+  // Enable the enhanced bookmarks sync datatype.
+  bool enhanced_bookmarks_enabled;
+
+  // Enhanced bookmarks extension id.
+  std::string enhanced_bookmarks_ext_id;
 };
 
 }  // namespace syncer