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

Side by Side Diff: components/sync/engine_impl/syncer_proto_util.cc

Issue 2389443003: [Sync] Remove special cased sessions default commit (Closed)
Patch Set: Updating custom nudge delay for favicons as well: Created 4 years, 2 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
« no previous file with comments | « components/sync/engine_impl/cycle/nudge_tracker_unittest.cc ('k') | no next file » | 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 "components/sync/engine_impl/syncer_proto_util.h" 5 #include "components/sync/engine_impl/syncer_proto_util.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 if (command.has_set_sync_poll_interval()) { 419 if (command.has_set_sync_poll_interval()) {
420 cycle->delegate()->OnReceivedShortPollIntervalUpdate( 420 cycle->delegate()->OnReceivedShortPollIntervalUpdate(
421 base::TimeDelta::FromSeconds(command.set_sync_poll_interval())); 421 base::TimeDelta::FromSeconds(command.set_sync_poll_interval()));
422 } 422 }
423 423
424 if (command.has_sessions_commit_delay_seconds()) { 424 if (command.has_sessions_commit_delay_seconds()) {
425 std::map<ModelType, base::TimeDelta> delay_map; 425 std::map<ModelType, base::TimeDelta> delay_map;
426 delay_map[SESSIONS] = 426 delay_map[SESSIONS] =
427 base::TimeDelta::FromSeconds(command.sessions_commit_delay_seconds()); 427 base::TimeDelta::FromSeconds(command.sessions_commit_delay_seconds());
428 delay_map[FAVICON_TRACKING] =
429 base::TimeDelta::FromSeconds(command.sessions_commit_delay_seconds());
430 delay_map[FAVICON_IMAGES] =
431 base::TimeDelta::FromSeconds(command.sessions_commit_delay_seconds());
428 cycle->delegate()->OnReceivedCustomNudgeDelays(delay_map); 432 cycle->delegate()->OnReceivedCustomNudgeDelays(delay_map);
429 } 433 }
430 434
431 if (command.has_client_invalidation_hint_buffer_size()) { 435 if (command.has_client_invalidation_hint_buffer_size()) {
432 cycle->delegate()->OnReceivedClientInvalidationHintBufferSize( 436 cycle->delegate()->OnReceivedClientInvalidationHintBufferSize(
433 command.client_invalidation_hint_buffer_size()); 437 command.client_invalidation_hint_buffer_size());
434 } 438 }
435 439
436 if (command.has_gu_retry_delay_seconds()) { 440 if (command.has_gu_retry_delay_seconds()) {
437 cycle->delegate()->OnReceivedGuRetryDelay( 441 cycle->delegate()->OnReceivedGuRetryDelay(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 596 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
593 const ClientToServerResponse& response) { 597 const ClientToServerResponse& response) {
594 // Add more handlers as needed. 598 // Add more handlers as needed.
595 std::string output; 599 std::string output;
596 if (response.has_get_updates()) 600 if (response.has_get_updates())
597 output.append(GetUpdatesResponseString(response.get_updates())); 601 output.append(GetUpdatesResponseString(response.get_updates()));
598 return output; 602 return output;
599 } 603 }
600 604
601 } // namespace syncer 605 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/cycle/nudge_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698