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

Unified Diff: sync/tools/testserver/chromiumsync.py

Issue 143973006: New Sync datatype for Synced Notifications App Info (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AppInfo: Rename fields in protobuf to match code better. Created 6 years, 11 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/tools/testserver/chromiumsync.py
diff --git a/sync/tools/testserver/chromiumsync.py b/sync/tools/testserver/chromiumsync.py
index 79eb1147e7bf035c1c1580cfe0ae2995e6b2c4cb..df47e55a0003f3fb7539b9bb7ca75d5f78cbc96d 100644
--- a/sync/tools/testserver/chromiumsync.py
+++ b/sync/tools/testserver/chromiumsync.py
@@ -49,6 +49,7 @@ import search_engine_specifics_pb2
import session_specifics_pb2
import sync_pb2
import sync_enums_pb2
+import synced_notification_app_info_specifics_pb2
import synced_notification_data_pb2
import synced_notification_render_pb2
import synced_notification_specifics_pb2
@@ -84,11 +85,12 @@ ALL_TYPES = (
SEARCH_ENGINE,
SESSION,
SYNCED_NOTIFICATION,
+ SYNCED_NOTIFICATION_APP_INFO,
THEME,
TYPED_URL,
EXTENSION_SETTINGS,
FAVICON_IMAGES,
- FAVICON_TRACKING) = range(29)
+ FAVICON_TRACKING) = range(30)
# An enumeration on the frequency at which the server should send errors
# to the client. This would be specified by the url that triggers the error.
@@ -132,6 +134,8 @@ SYNC_TYPE_TO_DESCRIPTOR = {
SEARCH_ENGINE: SYNC_TYPE_FIELDS['search_engine'],
SESSION: SYNC_TYPE_FIELDS['session'],
SYNCED_NOTIFICATION: SYNC_TYPE_FIELDS["synced_notification"],
+ SYNCED_NOTIFICATION_APP_INFO:
+ SYNC_TYPE_FIELDS["synced_notification_app_info"],
THEME: SYNC_TYPE_FIELDS['theme'],
TYPED_URL: SYNC_TYPE_FIELDS['typed_url'],
}
@@ -545,6 +549,9 @@ class SyncDataModel(object):
PermanentItem('google_chrome_synced_notifications',
name='Synced Notifications',
parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION),
+ PermanentItem('google_chrome_synced_notification_app_info',
+ name='Synced Notification App Info',
+ parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION_APP_INFO),
PermanentItem('google_chrome_search_engines', name='Search Engines',
parent_tag=ROOT_ID, sync_type=SEARCH_ENGINE),
PermanentItem('google_chrome_sessions', name='Sessions',
@@ -1224,7 +1231,6 @@ class SyncDataModel(object):
return specifics
-
def _CreateSyncedNotificationClientTag(self, key):
"""Create the client_defined_unique_tag value for a SyncedNotification.
@@ -1240,7 +1246,6 @@ class SyncDataModel(object):
hash_input = serialized_type.SerializeToString() + key
return base64.b64encode(hashlib.sha1(hash_input).digest())
-
class TestServer(object):
"""An object to handle requests for one (and only one) Chrome Sync account.

Powered by Google App Engine
This is Rietveld 408576698