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

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

Issue 133763007: [Recommit] (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
« no previous file with comments | « sync/engine/syncer.cc ('k') | 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 }
436 } 441 }
437 442
438 // Now do any special handling for the error type and decide on the return 443 // Now do any special handling for the error type and decide on the return
439 // value. 444 // value.
440 switch (sync_protocol_error.error_type) { 445 switch (sync_protocol_error.error_type) {
441 case UNKNOWN_ERROR: 446 case UNKNOWN_ERROR:
442 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more " 447 LOG(WARNING) << "Sync protocol out-of-date. The server is using a more "
443 << "recent version."; 448 << "recent version.";
444 return SERVER_RETURN_UNKNOWN_ERROR; 449 return SERVER_RETURN_UNKNOWN_ERROR;
445 case SYNC_SUCCESS: 450 case SYNC_SUCCESS:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 578 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
574 const ClientToServerResponse& response) { 579 const ClientToServerResponse& response) {
575 // Add more handlers as needed. 580 // Add more handlers as needed.
576 std::string output; 581 std::string output;
577 if (response.has_get_updates()) 582 if (response.has_get_updates())
578 output.append(GetUpdatesResponseString(response.get_updates())); 583 output.append(GetUpdatesResponseString(response.get_updates()));
579 return output; 584 return output;
580 } 585 }
581 586
582 } // namespace syncer 587 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698