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

Side by Side Diff: chrome/browser/sync/test/integration/performance/sync_timing_helper.cc

Issue 2767893002: Remove ScopedVector from chrome/browser/. (Closed)
Patch Set: Created 3 years, 9 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
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 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 5 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 9 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
10 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h " 10 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h "
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace sync_timing_helper { 13 namespace sync_timing_helper {
14 14
15 base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client) { 15 base::TimeDelta TimeSyncCycle(ProfileSyncServiceHarness* client) {
16 base::Time start = base::Time::Now(); 16 base::Time start = base::Time::Now();
17 EXPECT_TRUE(UpdatedProgressMarkerChecker(client->service()).Wait()); 17 EXPECT_TRUE(UpdatedProgressMarkerChecker(client->service()).Wait());
18 return base::Time::Now() - start; 18 return base::Time::Now() - start;
19 } 19 }
20 20
21 base::TimeDelta TimeMutualSyncCycle(ProfileSyncServiceHarness* client, 21 base::TimeDelta TimeMutualSyncCycle(ProfileSyncServiceHarness* client,
22 ProfileSyncServiceHarness* partner) { 22 ProfileSyncServiceHarness* partner) {
23 base::Time start = base::Time::Now(); 23 base::Time start = base::Time::Now();
24 EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner)); 24 EXPECT_TRUE(client->AwaitMutualSyncCycleCompletion(partner));
25 return base::Time::Now() - start; 25 return base::Time::Now() - start;
26 } 26 }
27 27
28 base::TimeDelta TimeUntilQuiescence( 28 base::TimeDelta TimeUntilQuiescence(
29 const std::vector<ProfileSyncServiceHarness*>& clients) { 29 std::vector<ProfileSyncServiceHarness*> clients) {
30 base::Time start = base::Time::Now(); 30 base::Time start = base::Time::Now();
31 EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(clients)); 31 EXPECT_TRUE(ProfileSyncServiceHarness::AwaitQuiescence(std::move(clients)));
32 return base::Time::Now() - start; 32 return base::Time::Now() - start;
33 } 33 }
34 34
35 void PrintResult(const std::string& measurement, 35 void PrintResult(const std::string& measurement,
36 const std::string& trace, 36 const std::string& trace,
37 const base::TimeDelta& dt) { 37 const base::TimeDelta& dt) {
38 printf("*RESULT %s: %s= %s ms\n", measurement.c_str(), trace.c_str(), 38 printf("*RESULT %s: %s= %s ms\n", measurement.c_str(), trace.c_str(),
39 base::Int64ToString(dt.InMilliseconds()).c_str()); 39 base::Int64ToString(dt.InMilliseconds()).c_str());
40 } 40 }
41 41
42 } // namespace sync_timing_helper 42 } // namespace sync_timing_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698