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 "sync/sessions/test_util.h" | 5 #include "sync/sessions/test_util.h" |
6 | 6 |
7 namespace syncer { | 7 namespace syncer { |
8 namespace sessions { | 8 namespace sessions { |
9 namespace test_util { | 9 namespace test_util { |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 SimulatePollSuccess(requested_types, session); | 115 SimulatePollSuccess(requested_types, session); |
116 session->delegate()->OnReceivedLongPollIntervalUpdate(new_poll); | 116 session->delegate()->OnReceivedLongPollIntervalUpdate(new_poll); |
117 } | 117 } |
118 | 118 |
119 void SimulateSessionsCommitDelayUpdateImpl( | 119 void SimulateSessionsCommitDelayUpdateImpl( |
120 ModelTypeSet requested_types, | 120 ModelTypeSet requested_types, |
121 const sessions::NudgeTracker& nudge_tracker, | 121 const sessions::NudgeTracker& nudge_tracker, |
122 sessions::SyncSession* session, | 122 sessions::SyncSession* session, |
123 const base::TimeDelta& new_delay) { | 123 const base::TimeDelta& new_delay) { |
124 SimulateNormalSuccess(requested_types, nudge_tracker, session); | 124 SimulateNormalSuccess(requested_types, nudge_tracker, session); |
125 session->delegate()->OnReceivedSessionsCommitDelay(new_delay); | 125 std::map<ModelType, base::TimeDelta> delay_map; |
| 126 delay_map[SESSIONS] = new_delay; |
| 127 session->delegate()->OnReceivedCustomNudgeDelays(delay_map); |
126 } | 128 } |
127 | 129 |
128 void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session, | 130 void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session, |
129 base::TimeDelta delay) { | 131 base::TimeDelta delay) { |
130 session->mutable_status_controller()->set_last_download_updates_result( | 132 session->mutable_status_controller()->set_last_download_updates_result( |
131 SYNCER_OK); | 133 SYNCER_OK); |
132 session->delegate()->OnReceivedGuRetryDelay(delay); | 134 session->delegate()->OnReceivedGuRetryDelay(delay); |
133 } | 135 } |
134 | 136 |
135 } // namespace test_util | 137 } // namespace test_util |
136 } // namespace sessions | 138 } // namespace sessions |
137 } // namespace syncer | 139 } // namespace syncer |
OLD | NEW |