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

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

Issue 158953004: sync: Move migration signal out of snapshot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 session->delegate()->OnTypesThrottled( 455 session->delegate()->OnTypesThrottled(
456 sync_protocol_error.error_data_types, 456 sync_protocol_error.error_data_types,
457 GetThrottleDelay(*response)); 457 GetThrottleDelay(*response));
458 } 458 }
459 return SERVER_RETURN_THROTTLED; 459 return SERVER_RETURN_THROTTLED;
460 case TRANSIENT_ERROR: 460 case TRANSIENT_ERROR:
461 return SERVER_RETURN_TRANSIENT_ERROR; 461 return SERVER_RETURN_TRANSIENT_ERROR;
462 case MIGRATION_DONE: 462 case MIGRATION_DONE:
463 LOG_IF(ERROR, 0 >= response->migrated_data_type_id_size()) 463 LOG_IF(ERROR, 0 >= response->migrated_data_type_id_size())
464 << "MIGRATION_DONE but no types specified."; 464 << "MIGRATION_DONE but no types specified.";
465 // TODO(akalin): This should be a set union. 465 session->delegate()->OnReceivedMigrationRequest(
466 session->mutable_status_controller()-> 466 GetTypesToMigrate(*response));
467 set_types_needing_local_migration(GetTypesToMigrate(*response));
468 return SERVER_RETURN_MIGRATION_DONE; 467 return SERVER_RETURN_MIGRATION_DONE;
469 case CLEAR_PENDING: 468 case CLEAR_PENDING:
470 return SERVER_RETURN_CLEAR_PENDING; 469 return SERVER_RETURN_CLEAR_PENDING;
471 case NOT_MY_BIRTHDAY: 470 case NOT_MY_BIRTHDAY:
472 return SERVER_RETURN_NOT_MY_BIRTHDAY; 471 return SERVER_RETURN_NOT_MY_BIRTHDAY;
473 case DISABLED_BY_ADMIN: 472 case DISABLED_BY_ADMIN:
474 return SERVER_RETURN_DISABLED_BY_ADMIN; 473 return SERVER_RETURN_DISABLED_BY_ADMIN;
475 default: 474 default:
476 NOTREACHED(); 475 NOTREACHED();
477 return UNSET; 476 return UNSET;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 573 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
575 const ClientToServerResponse& response) { 574 const ClientToServerResponse& response) {
576 // Add more handlers as needed. 575 // Add more handlers as needed.
577 std::string output; 576 std::string output;
578 if (response.has_get_updates()) 577 if (response.has_get_updates())
579 output.append(GetUpdatesResponseString(response.get_updates())); 578 output.append(GetUpdatesResponseString(response.get_updates()));
580 return output; 579 return output;
581 } 580 }
582 581
583 } // namespace syncer 582 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698