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

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

Issue 135923002: Revert 244381 "Support GU retry command in sync engine. The comm..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
« no previous file with comments | « trunk/src/sync/engine/syncer.cc ('k') | trunk/src/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (command.has_gu_retry_delay_seconds()) {
438 session->delegate()->OnReceivedGuRetryDelay(
439 base::TimeDelta::FromSeconds(command.gu_retry_delay_seconds()));
440 }
441 } 436 }
442 437
443 // Now do any special handling for the error type and decide on the return 438 // Now do any special handling for the error type and decide on the return
444 // value. 439 // value.
445 switch (sync_protocol_error.error_type) { 440 switch (sync_protocol_error.error_type) {
446 case UNKNOWN_ERROR: 441 case UNKNOWN_ERROR:
447 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more " 442 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more "
448 << "recent version."; 443 << "recent version.";
449 return SERVER_RETURN_UNKNOWN_ERROR; 444 return SERVER_RETURN_UNKNOWN_ERROR;
450 case SYNC_SUCCESS: 445 case SYNC_SUCCESS:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 573 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
579 const ClientToServerResponse& response) { 574 const ClientToServerResponse& response) {
580 // Add more handlers as needed. 575 // Add more handlers as needed.
581 std::string output; 576 std::string output;
582 if (response.has_get_updates()) 577 if (response.has_get_updates())
583 output.append(GetUpdatesResponseString(response.get_updates())); 578 output.append(GetUpdatesResponseString(response.get_updates()));
584 return output; 579 return output;
585 } 580 }
586 581
587 } // namespace syncer 582 } // namespace syncer
OLDNEW
« no previous file with comments | « trunk/src/sync/engine/syncer.cc ('k') | trunk/src/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698