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

Unified Diff: chrome/browser/sync/engine/syncer_proto_util.cc

Issue 8851006: [Sync] Replace all instances of ModelTypeSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup pass #2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/engine/syncer_proto_util.cc
diff --git a/chrome/browser/sync/engine/syncer_proto_util.cc b/chrome/browser/sync/engine/syncer_proto_util.cc
index ca782f326e6498a2cb02dca26c0b82fdf74baae0..5c7f757ffcd30dab2c5f48a432867e51c2400748 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.cc
+++ b/chrome/browser/sync/engine/syncer_proto_util.cc
@@ -194,11 +194,11 @@ void SyncerProtoUtil::HandleThrottleError(
sessions::SyncSessionContext* context,
sessions::SyncSession::Delegate* delegate) {
DCHECK_EQ(error.error_type, browser_sync::THROTTLED);
- if (error.error_data_types.size() > 0) {
- context->SetUnthrottleTime(error.error_data_types, throttled_until);
- } else {
+ if (error.error_data_types.Empty()) {
// No datatypes indicates the client should be completely throttled.
delegate->OnSilencedUntil(throttled_until);
+ } else {
+ context->SetUnthrottleTime(error.error_data_types, throttled_until);
}
}
@@ -278,7 +278,7 @@ browser_sync::SyncProtocolError ConvertErrorPBToLocalType(
// THROTTLED is currently the only error code that uses |error_data_types|.
DCHECK_EQ(error.error_type(), ClientToServerResponse::THROTTLED);
for (int i = 0; i < error.error_data_type_ids_size(); ++i) {
- sync_protocol_error.error_data_types.insert(
+ sync_protocol_error.error_data_types.Put(
syncable::GetModelTypeFromExtensionFieldNumber(
error.error_data_type_ids(i)));
}
« no previous file with comments | « chrome/browser/sync/engine/nigori_util_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