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

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

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/engine/syncer_proto_util.h" 5 #include "chrome/browser/sync/engine/syncer_proto_util.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/sync/engine/net/server_connection_manager.h" 9 #include "chrome/browser/sync/engine/net/server_connection_manager.h"
10 #include "chrome/browser/sync/engine/syncer.h" 10 #include "chrome/browser/sync/engine/syncer.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 } // namespace 82 } // namespace
83 83
84 // static 84 // static
85 void SyncerProtoUtil::HandleMigrationDoneResponse( 85 void SyncerProtoUtil::HandleMigrationDoneResponse(
86 const sync_pb::ClientToServerResponse* response, 86 const sync_pb::ClientToServerResponse* response,
87 sessions::SyncSession* session) { 87 sessions::SyncSession* session) {
88 LOG_IF(ERROR, 0 >= response->migrated_data_type_id_size()) 88 LOG_IF(ERROR, 0 >= response->migrated_data_type_id_size())
89 << "MIGRATION_DONE but no types specified."; 89 << "MIGRATION_DONE but no types specified.";
90 syncable::ModelEnumSet to_migrate; 90 syncable::ModelTypeSet to_migrate;
91 for (int i = 0; i < response->migrated_data_type_id_size(); i++) { 91 for (int i = 0; i < response->migrated_data_type_id_size(); i++) {
92 to_migrate.Put(syncable::GetModelTypeFromExtensionFieldNumber( 92 to_migrate.Put(syncable::GetModelTypeFromExtensionFieldNumber(
93 response->migrated_data_type_id(i))); 93 response->migrated_data_type_id(i)));
94 } 94 }
95 // TODO(akalin): This should be a set union. 95 // TODO(akalin): This should be a set union.
96 session->mutable_status_controller()-> 96 session->mutable_status_controller()->
97 set_types_needing_local_migration(to_migrate); 97 set_types_needing_local_migration(to_migrate);
98 } 98 }
99 99
100 // static 100 // static
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 499 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
500 const sync_pb::ClientToServerResponse& response) { 500 const sync_pb::ClientToServerResponse& response) {
501 // Add more handlers as needed. 501 // Add more handlers as needed.
502 std::string output; 502 std::string output;
503 if (response.has_get_updates()) 503 if (response.has_get_updates())
504 output.append(GetUpdatesResponseString(response.get_updates())); 504 output.append(GetUpdatesResponseString(response.get_updates()));
505 return output; 505 return output;
506 } 506 }
507 507
508 } // namespace browser_sync 508 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/sync_scheduler_unittest.cc ('k') | chrome/browser/sync/engine/syncer_proto_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698