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

Side by Side Diff: chrome/browser/sync/sessions/test_util.h

Issue 6286067: sync: add a SyncSessionJobPurpose for clearing sync user data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: whitespace Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Utils to simulate various outcomes of a sync session. 5 // Utils to simulate various outcomes of a sync session.
6 #ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ 6 #ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
7 #define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ 7 #define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
8 #pragma once 8 #pragma once
9 9
10 #include "chrome/browser/sync/engine/syncer.h"
10 #include "chrome/browser/sync/sessions/sync_session.h" 11 #include "chrome/browser/sync/sessions/sync_session.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
13 14
14 namespace browser_sync { 15 namespace browser_sync {
15 namespace sessions { 16 namespace sessions {
16 namespace test_util { 17 namespace test_util {
17 18
18 void SimulateHasMoreToSync(sessions::SyncSession* session); 19 void SimulateHasMoreToSync(sessions::SyncSession* session,
19 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session); 20 SyncerStep begin, SyncerStep end);
20 void SimulateCommitFailed(sessions::SyncSession* session); 21 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session,
21 void SimulateSuccess(sessions::SyncSession* session); 22 SyncerStep begin, SyncerStep end);
23 void SimulateCommitFailed(sessions::SyncSession* session,
24 SyncerStep begin, SyncerStep end);
25 void SimulateSuccess(sessions::SyncSession* session,
26 SyncerStep begin, SyncerStep end);
22 void SimulateThrottledImpl(sessions::SyncSession* session, 27 void SimulateThrottledImpl(sessions::SyncSession* session,
23 const base::TimeDelta& delta); 28 const base::TimeDelta& delta);
24 void SimulatePollIntervalUpdateImpl(sessions::SyncSession* session, 29 void SimulatePollIntervalUpdateImpl(sessions::SyncSession* session,
25 const base::TimeDelta& new_poll); 30 const base::TimeDelta& new_poll);
26 31
27 ACTION_P(SimulateThrottled, throttle) { 32 ACTION_P(SimulateThrottled, throttle) {
28 SimulateThrottledImpl(arg0, throttle); 33 SimulateThrottledImpl(arg0, throttle);
29 } 34 }
30 35
31 ACTION_P(SimulatePollIntervalUpdate, poll) { 36 ACTION_P(SimulatePollIntervalUpdate, poll) {
32 SimulatePollIntervalUpdateImpl(arg0, poll); 37 SimulatePollIntervalUpdateImpl(arg0, poll);
33 } 38 }
34 39
35 } // namespace test_util 40 } // namespace test_util
36 } // namespace sessions 41 } // namespace sessions
37 } // namespace browser_sync 42 } // namespace browser_sync
38 43
39 #endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ 44 #endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698