| OLD | NEW |
| 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 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ |
| 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ | 6 #define CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class TimeDelta; | 14 class TimeDelta; |
| 15 } | 15 } |
| 16 | 16 |
| 17 class ProfileSyncServiceHarness; | 17 class ProfileSyncServiceHarness; |
| 18 | 18 |
| 19 class LiveSyncTimingHelper { | 19 class SyncTimingHelper { |
| 20 public: | 20 public: |
| 21 LiveSyncTimingHelper(); | 21 SyncTimingHelper(); |
| 22 ~LiveSyncTimingHelper(); | 22 ~SyncTimingHelper(); |
| 23 | 23 |
| 24 // Returns the time taken for |client| to complete a single sync cycle. | 24 // Returns the time taken for |client| to complete a single sync cycle. |
| 25 static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); | 25 static base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client); |
| 26 | 26 |
| 27 // Returns the time taken for both |client| and |partner| to complete a sync | 27 // Returns the time taken for both |client| and |partner| to complete a sync |
| 28 // cycle. | 28 // cycle. |
| 29 static base::TimeDelta TimeMutualSyncCycle( | 29 static base::TimeDelta TimeMutualSyncCycle( |
| 30 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner); | 30 ProfileSyncServiceHarness* client, ProfileSyncServiceHarness* partner); |
| 31 | 31 |
| 32 // Returns the time taken for all clients in |clients| to complete their | 32 // Returns the time taken for all clients in |clients| to complete their |
| 33 // respective sync cycles. | 33 // respective sync cycles. |
| 34 static base::TimeDelta TimeUntilQuiescence( | 34 static base::TimeDelta TimeUntilQuiescence( |
| 35 std::vector<ProfileSyncServiceHarness*>& clients); | 35 std::vector<ProfileSyncServiceHarness*>& clients); |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(LiveSyncTimingHelper); | 38 DISALLOW_COPY_AND_ASSIGN(SyncTimingHelper); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TIMING_HELPER_H_ | 41 #endif // CHROME_TEST_LIVE_SYNC_PERFORMANCE_SYNC_TIMING_HELPER_H_ |
| OLD | NEW |