diff options
author | petewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:00:06 +0000 |
---|---|---|
committer | petewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:00:06 +0000 |
commit | 0e90ab01373af01ea3fdc3aa97b5bceaf2e990fa (patch) | |
tree | c3a60f8a3343b88758f736a65632efa6cf1af322 /sync/tools | |
parent | 04b9a4170fd0692fe38b6202a936faf3c21f2ed5 (diff) | |
download | chromium_src-0e90ab01373af01ea3fdc3aa97b5bceaf2e990fa.zip chromium_src-0e90ab01373af01ea3fdc3aa97b5bceaf2e990fa.tar.gz chromium_src-0e90ab01373af01ea3fdc3aa97b5bceaf2e990fa.tar.bz2 |
New Sync datatype for Synced Notifications App Info
This is the first checkin for creating a new sync datatype for the synced notifications app info. The new datatype will be used for synced notification metadata such as the name and icon of the service sending the synced notification.
BUG=280266
Review URL: https://codereview.chromium.org/143973006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/tools')
-rw-r--r-- | sync/tools/sync_client.cc | 1 | ||||
-rw-r--r-- | sync/tools/testserver/chromiumsync.py | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sync/tools/sync_client.cc b/sync/tools/sync_client.cc index 93b80e0..953df92 100644 --- a/sync/tools/sync_client.cc +++ b/sync/tools/sync_client.cc @@ -309,6 +309,7 @@ int SyncClientMain(int argc, char* argv[]) { model_types.Put(APP_NOTIFICATIONS); model_types.Put(HISTORY_DELETE_DIRECTIVES); model_types.Put(SYNCED_NOTIFICATIONS); + model_types.Put(SYNCED_NOTIFICATION_APP_INFO); model_types.Put(DEVICE_INFO); model_types.Put(EXPERIMENTS); model_types.Put(PRIORITY_PREFERENCES); diff --git a/sync/tools/testserver/chromiumsync.py b/sync/tools/testserver/chromiumsync.py index 79eb114..df47e55 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. |