| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |