Chromium Code Reviews| Index: sync/engine/syncer_proto_util.cc |
| diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc |
| index 23bdf451db2487a3e970851bfd3742710487a989..98998713a9b76201483a22dbacbd3226bfacd782 100644 |
| --- a/sync/engine/syncer_proto_util.cc |
| +++ b/sync/engine/syncer_proto_util.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/format_macros.h" |
| #include "base/stringprintf.h" |
| +#include "sync/engine/throttled_data_type_tracker.h" |
|
tim (not reviewing)
2012/06/11 18:53:46
include order
(tools/sort-headers.py is great!)
rlarocque
2012/06/11 23:28:51
Done.
|
| #include "sync/engine/net/server_connection_manager.h" |
| #include "sync/engine/syncer.h" |
| #include "sync/engine/syncer_types.h" |
| @@ -213,14 +214,14 @@ base::TimeDelta SyncerProtoUtil::GetThrottleDelay( |
| void SyncerProtoUtil::HandleThrottleError( |
| const SyncProtocolError& error, |
| const base::TimeTicks& throttled_until, |
| - sessions::SyncSessionContext* context, |
| + ThrottledDataTypeTracker* tdtt, |
|
tim (not reviewing)
2012/06/11 18:53:46
We should try to use as meaningful a name as possi
rlarocque
2012/06/11 23:28:51
Done.
|
| sessions::SyncSession::Delegate* delegate) { |
| DCHECK_EQ(error.error_type, browser_sync::THROTTLED); |
| 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); |
| + tdtt->SetUnthrottleTime(error.error_data_types, throttled_until); |
| } |
| } |
| @@ -393,7 +394,7 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( |
| LOG(WARNING) << "Client silenced by server."; |
| HandleThrottleError(sync_protocol_error, |
| base::TimeTicks::Now() + GetThrottleDelay(*response), |
| - session->context(), |
| + session->context()->throttled_data_type_tracker(), |
| session->delegate()); |
| return SERVER_RETURN_THROTTLED; |
| case browser_sync::TRANSIENT_ERROR: |