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

Side by Side Diff: components/sync/tools/testserver/chromiumsync.py

Issue 2306763002: Add PrinterSpecifics to the sync protos. (Closed)
Patch Set: PrintersSpecifics -> PrinterSpecifics Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « components/sync/syncable/nigori_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """An implementation of the server side of the Chromium sync protocol. 5 """An implementation of the server side of the Chromium sync protocol.
6 6
7 The details of the protocol are described mostly by comments in the protocol 7 The details of the protocol are described mostly by comments in the protocol
8 buffer definition at chrome/browser/sync/protocol/sync.proto. 8 buffer definition at chrome/browser/sync/protocol/sync.proto.
9 """ 9 """
10 10
(...skipping 28 matching lines...) Expand all
39 import favicon_image_specifics_pb2 39 import favicon_image_specifics_pb2
40 import favicon_tracking_specifics_pb2 40 import favicon_tracking_specifics_pb2
41 import history_delete_directive_specifics_pb2 41 import history_delete_directive_specifics_pb2
42 import managed_user_setting_specifics_pb2 42 import managed_user_setting_specifics_pb2
43 import managed_user_specifics_pb2 43 import managed_user_specifics_pb2
44 import managed_user_shared_setting_specifics_pb2 44 import managed_user_shared_setting_specifics_pb2
45 import managed_user_whitelist_specifics_pb2 45 import managed_user_whitelist_specifics_pb2
46 import nigori_specifics_pb2 46 import nigori_specifics_pb2
47 import password_specifics_pb2 47 import password_specifics_pb2
48 import preference_specifics_pb2 48 import preference_specifics_pb2
49 import printer_specifics_pb2
49 import priority_preference_specifics_pb2 50 import priority_preference_specifics_pb2
50 import search_engine_specifics_pb2 51 import search_engine_specifics_pb2
51 import session_specifics_pb2 52 import session_specifics_pb2
52 import sync_pb2 53 import sync_pb2
53 import sync_enums_pb2 54 import sync_enums_pb2
54 import synced_notification_app_info_specifics_pb2 55 import synced_notification_app_info_specifics_pb2
55 import synced_notification_specifics_pb2 56 import synced_notification_specifics_pb2
56 import theme_specifics_pb2 57 import theme_specifics_pb2
57 import typed_url_specifics_pb2 58 import typed_url_specifics_pb2
58 import wifi_credential_specifics_pb2 59 import wifi_credential_specifics_pb2
(...skipping 20 matching lines...) Expand all
79 EXPERIMENTS, 80 EXPERIMENTS,
80 EXTENSIONS, 81 EXTENSIONS,
81 HISTORY_DELETE_DIRECTIVE, 82 HISTORY_DELETE_DIRECTIVE,
82 MANAGED_USER_SETTING, 83 MANAGED_USER_SETTING,
83 MANAGED_USER_SHARED_SETTING, 84 MANAGED_USER_SHARED_SETTING,
84 MANAGED_USER_WHITELIST, 85 MANAGED_USER_WHITELIST,
85 MANAGED_USER, 86 MANAGED_USER,
86 NIGORI, 87 NIGORI,
87 PASSWORD, 88 PASSWORD,
88 PREFERENCE, 89 PREFERENCE,
90 PRINTERS,
89 PRIORITY_PREFERENCE, 91 PRIORITY_PREFERENCE,
90 SEARCH_ENGINE, 92 SEARCH_ENGINE,
91 SESSION, 93 SESSION,
92 SYNCED_NOTIFICATION, 94 SYNCED_NOTIFICATION,
93 SYNCED_NOTIFICATION_APP_INFO, 95 SYNCED_NOTIFICATION_APP_INFO,
94 THEME, 96 THEME,
95 TYPED_URL, 97 TYPED_URL,
96 EXTENSION_SETTINGS, 98 EXTENSION_SETTINGS,
97 FAVICON_IMAGES, 99 FAVICON_IMAGES,
98 FAVICON_TRACKING, 100 FAVICON_TRACKING,
99 WIFI_CREDENTIAL) = range(35) 101 WIFI_CREDENTIAL) = range(36)
100 102
101 # An enumeration on the frequency at which the server should send errors 103 # An enumeration on the frequency at which the server should send errors
102 # to the client. This would be specified by the url that triggers the error. 104 # to the client. This would be specified by the url that triggers the error.
103 # Note: This enum should be kept in the same order as the enum in sync_test.h. 105 # Note: This enum should be kept in the same order as the enum in sync_test.h.
104 SYNC_ERROR_FREQUENCY = ( 106 SYNC_ERROR_FREQUENCY = (
105 ERROR_FREQUENCY_NONE, 107 ERROR_FREQUENCY_NONE,
106 ERROR_FREQUENCY_ALWAYS, 108 ERROR_FREQUENCY_ALWAYS,
107 ERROR_FREQUENCY_TWO_THIRDS) = range(3) 109 ERROR_FREQUENCY_TWO_THIRDS) = range(3)
108 110
109 # Well-known server tag of the top level 'Google Chrome' folder. 111 # Well-known server tag of the top level 'Google Chrome' folder.
(...skipping 23 matching lines...) Expand all
133 FAVICON_TRACKING: SYNC_TYPE_FIELDS['favicon_tracking'], 135 FAVICON_TRACKING: SYNC_TYPE_FIELDS['favicon_tracking'],
134 HISTORY_DELETE_DIRECTIVE: SYNC_TYPE_FIELDS['history_delete_directive'], 136 HISTORY_DELETE_DIRECTIVE: SYNC_TYPE_FIELDS['history_delete_directive'],
135 MANAGED_USER_SHARED_SETTING: 137 MANAGED_USER_SHARED_SETTING:
136 SYNC_TYPE_FIELDS['managed_user_shared_setting'], 138 SYNC_TYPE_FIELDS['managed_user_shared_setting'],
137 MANAGED_USER_SETTING: SYNC_TYPE_FIELDS['managed_user_setting'], 139 MANAGED_USER_SETTING: SYNC_TYPE_FIELDS['managed_user_setting'],
138 MANAGED_USER_WHITELIST: SYNC_TYPE_FIELDS['managed_user_whitelist'], 140 MANAGED_USER_WHITELIST: SYNC_TYPE_FIELDS['managed_user_whitelist'],
139 MANAGED_USER: SYNC_TYPE_FIELDS['managed_user'], 141 MANAGED_USER: SYNC_TYPE_FIELDS['managed_user'],
140 NIGORI: SYNC_TYPE_FIELDS['nigori'], 142 NIGORI: SYNC_TYPE_FIELDS['nigori'],
141 PASSWORD: SYNC_TYPE_FIELDS['password'], 143 PASSWORD: SYNC_TYPE_FIELDS['password'],
142 PREFERENCE: SYNC_TYPE_FIELDS['preference'], 144 PREFERENCE: SYNC_TYPE_FIELDS['preference'],
145 PRINTERS: SYNC_TYPE_FIELDS['printer'],
143 PRIORITY_PREFERENCE: SYNC_TYPE_FIELDS['priority_preference'], 146 PRIORITY_PREFERENCE: SYNC_TYPE_FIELDS['priority_preference'],
144 SEARCH_ENGINE: SYNC_TYPE_FIELDS['search_engine'], 147 SEARCH_ENGINE: SYNC_TYPE_FIELDS['search_engine'],
145 SESSION: SYNC_TYPE_FIELDS['session'], 148 SESSION: SYNC_TYPE_FIELDS['session'],
146 SYNCED_NOTIFICATION: SYNC_TYPE_FIELDS["synced_notification"], 149 SYNCED_NOTIFICATION: SYNC_TYPE_FIELDS["synced_notification"],
147 SYNCED_NOTIFICATION_APP_INFO: 150 SYNCED_NOTIFICATION_APP_INFO:
148 SYNC_TYPE_FIELDS["synced_notification_app_info"], 151 SYNC_TYPE_FIELDS["synced_notification_app_info"],
149 THEME: SYNC_TYPE_FIELDS['theme'], 152 THEME: SYNC_TYPE_FIELDS['theme'],
150 TYPED_URL: SYNC_TYPE_FIELDS['typed_url'], 153 TYPED_URL: SYNC_TYPE_FIELDS['typed_url'],
151 WIFI_CREDENTIAL: SYNC_TYPE_FIELDS["wifi_credential"], 154 WIFI_CREDENTIAL: SYNC_TYPE_FIELDS["wifi_credential"],
152 } 155 }
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 parent_tag=ROOT_ID, sync_type=MANAGED_USER_SHARED_SETTING), 561 parent_tag=ROOT_ID, sync_type=MANAGED_USER_SHARED_SETTING),
559 PermanentItem('google_chrome_managed_user_whitelists', 562 PermanentItem('google_chrome_managed_user_whitelists',
560 name='Managed User Whitelists', parent_tag=ROOT_ID, 563 name='Managed User Whitelists', parent_tag=ROOT_ID,
561 sync_type=MANAGED_USER_WHITELIST), 564 sync_type=MANAGED_USER_WHITELIST),
562 PermanentItem('google_chrome_nigori', name='Nigori', 565 PermanentItem('google_chrome_nigori', name='Nigori',
563 parent_tag=ROOT_ID, sync_type=NIGORI), 566 parent_tag=ROOT_ID, sync_type=NIGORI),
564 PermanentItem('google_chrome_passwords', name='Passwords', 567 PermanentItem('google_chrome_passwords', name='Passwords',
565 parent_tag=ROOT_ID, sync_type=PASSWORD), 568 parent_tag=ROOT_ID, sync_type=PASSWORD),
566 PermanentItem('google_chrome_preferences', name='Preferences', 569 PermanentItem('google_chrome_preferences', name='Preferences',
567 parent_tag=ROOT_ID, sync_type=PREFERENCE), 570 parent_tag=ROOT_ID, sync_type=PREFERENCE),
571 PermanentItem('google_chrome_printer', name='Printers',
572 parent_tag=ROOT_ID, sync_type=PRINTERS,
573 create_by_default=False),
568 PermanentItem('google_chrome_priority_preferences', 574 PermanentItem('google_chrome_priority_preferences',
569 name='Priority Preferences', 575 name='Priority Preferences',
570 parent_tag=ROOT_ID, sync_type=PRIORITY_PREFERENCE), 576 parent_tag=ROOT_ID, sync_type=PRIORITY_PREFERENCE),
571 PermanentItem('google_chrome_synced_notifications', 577 PermanentItem('google_chrome_synced_notifications',
572 name='Synced Notifications', 578 name='Synced Notifications',
573 parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION), 579 parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION),
574 PermanentItem('google_chrome_synced_notification_app_info', 580 PermanentItem('google_chrome_synced_notification_app_info',
575 name='Synced Notification App Info', 581 name='Synced Notification App Info',
576 parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION_APP_INFO), 582 parent_tag=ROOT_ID, sync_type=SYNCED_NOTIFICATION_APP_INFO),
577 PermanentItem('google_chrome_search_engines', name='Search Engines', 583 PermanentItem('google_chrome_search_engines', name='Search Engines',
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 1638
1633 Args: 1639 Args:
1634 sessions_commit_delay_seconds: The desired sync delay time for sessions. 1640 sessions_commit_delay_seconds: The desired sync delay time for sessions.
1635 """ 1641 """
1636 if not self._client_command: 1642 if not self._client_command:
1637 self._client_command = client_commands_pb2.ClientCommand() 1643 self._client_command = client_commands_pb2.ClientCommand()
1638 1644
1639 self._client_command.sessions_commit_delay_seconds = \ 1645 self._client_command.sessions_commit_delay_seconds = \
1640 sessions_commit_delay_seconds 1646 sessions_commit_delay_seconds
1641 return self._client_command 1647 return self._client_command
OLDNEW
« no previous file with comments | « components/sync/syncable/nigori_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698