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

Side by Side Diff: sync/engine/syncer_proto_util.cc

Issue 124083002: Client-side changes to support retry GU. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "sync/engine/syncer_proto_util.h" 5 #include "sync/engine/syncer_proto_util.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "google_apis/google_api_keys.h" 9 #include "google_apis/google_api_keys.h"
10 #include "sync/engine/net/server_connection_manager.h" 10 #include "sync/engine/net/server_connection_manager.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 if (command.has_sessions_commit_delay_seconds()) { 426 if (command.has_sessions_commit_delay_seconds()) {
427 session->delegate()->OnReceivedSessionsCommitDelay( 427 session->delegate()->OnReceivedSessionsCommitDelay(
428 base::TimeDelta::FromSeconds( 428 base::TimeDelta::FromSeconds(
429 command.sessions_commit_delay_seconds())); 429 command.sessions_commit_delay_seconds()));
430 } 430 }
431 431
432 if (command.has_client_invalidation_hint_buffer_size()) { 432 if (command.has_client_invalidation_hint_buffer_size()) {
433 session->delegate()->OnReceivedClientInvalidationHintBufferSize( 433 session->delegate()->OnReceivedClientInvalidationHintBufferSize(
434 command.client_invalidation_hint_buffer_size()); 434 command.client_invalidation_hint_buffer_size());
435 } 435 }
436
437
rlarocque 2014/01/10 00:42:00 nit: remove extra space.
haitaol1 2014/01/10 22:10:34 Done.
438 if (command.has_gu_retry_delay_seconds()) {
439 session->delegate()->OnReceivedGuRetryDelaySeconds(
440 command.gu_retry_delay_seconds());
441 }
436 } 442 }
437 443
438 // Now do any special handling for the error type and decide on the return 444 // Now do any special handling for the error type and decide on the return
439 // value. 445 // value.
440 switch (sync_protocol_error.error_type) { 446 switch (sync_protocol_error.error_type) {
441 case UNKNOWN_ERROR: 447 case UNKNOWN_ERROR:
442 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more " 448 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more "
443 << "recent version."; 449 << "recent version.";
444 return SERVER_RETURN_UNKNOWN_ERROR; 450 return SERVER_RETURN_UNKNOWN_ERROR;
445 case SYNC_SUCCESS: 451 case SYNC_SUCCESS:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 579 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
574 const ClientToServerResponse& response) { 580 const ClientToServerResponse& response) {
575 // Add more handlers as needed. 581 // Add more handlers as needed.
576 std::string output; 582 std::string output;
577 if (response.has_get_updates()) 583 if (response.has_get_updates())
578 output.append(GetUpdatesResponseString(response.get_updates())); 584 output.append(GetUpdatesResponseString(response.get_updates()));
579 return output; 585 return output;
580 } 586 }
581 587
582 } // namespace syncer 588 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698