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

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

Issue 2568543004: [Sync] Enable USS DeviceInfo for bots. (Closed)
Patch Set: Actually rebasing this time. Created 4 years 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
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if request.from_progress_marker: 422 if request.from_progress_marker:
423 for marker in request.from_progress_marker: 423 for marker in request.from_progress_marker:
424 data_type = ProtocolDataTypeIdToSyncType(marker.data_type_id) 424 data_type = ProtocolDataTypeIdToSyncType(marker.data_type_id)
425 if marker.HasField('timestamp_token_for_migration'): 425 if marker.HasField('timestamp_token_for_migration'):
426 timestamp = marker.timestamp_token_for_migration 426 timestamp = marker.timestamp_token_for_migration
427 if timestamp: 427 if timestamp:
428 self._migration_versions_to_check[data_type] = 1 428 self._migration_versions_to_check[data_type] = 1
429 elif marker.token: 429 elif marker.token:
430 (timestamp, version) = pickle.loads(marker.token) 430 (timestamp, version) = pickle.loads(marker.token)
431 self._migration_versions_to_check[data_type] = version 431 self._migration_versions_to_check[data_type] = version
432 elif marker.HasField('token'): 432 else:
433 timestamp = 0 433 timestamp = 0
434 else:
435 raise ValueError('No timestamp information in progress marker.')
436 data_type = ProtocolDataTypeIdToSyncType(marker.data_type_id) 434 data_type = ProtocolDataTypeIdToSyncType(marker.data_type_id)
437 self._state[data_type] = timestamp 435 self._state[data_type] = timestamp
438 elif request.HasField('from_timestamp'): 436 elif request.HasField('from_timestamp'):
439 for data_type in GetEntryTypesFromSpecifics(request.requested_types): 437 for data_type in GetEntryTypesFromSpecifics(request.requested_types):
440 self._state[data_type] = request.from_timestamp 438 self._state[data_type] = request.from_timestamp
441 self._migration_versions_to_check[data_type] = 1 439 self._migration_versions_to_check[data_type] = 1
442 if self._state: 440 if self._state:
443 self._state[TOP_LEVEL] = min(self._state.itervalues()) 441 self._state[TOP_LEVEL] = min(self._state.itervalues())
444 442
445 def SummarizeRequest(self): 443 def SummarizeRequest(self):
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 1640
1643 Args: 1641 Args:
1644 sessions_commit_delay_seconds: The desired sync delay time for sessions. 1642 sessions_commit_delay_seconds: The desired sync delay time for sessions.
1645 """ 1643 """
1646 if not self._client_command: 1644 if not self._client_command:
1647 self._client_command = client_commands_pb2.ClientCommand() 1645 self._client_command = client_commands_pb2.ClientCommand()
1648 1646
1649 self._client_command.sessions_commit_delay_seconds = \ 1647 self._client_command.sessions_commit_delay_seconds = \
1650 sessions_commit_delay_seconds 1648 sessions_commit_delay_seconds
1651 return self._client_command 1649 return self._client_command
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/enable_disable_test.cc ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698