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

Side by Side Diff: sync/sessions/test_util.cc

Issue 488843002: [Sync] Add support for server controlled nudge delays (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/test/engine/fake_sync_scheduler.h » ('j') | 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 "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
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
OLDNEW
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/test/engine/fake_sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698