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

Unified Diff: chrome/browser/sync/syncable/syncable_unittest.cc

Issue 9572039: Convert uses of int ms to TimeDelta in chrome/browser/sync. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/syncable/syncable_unittest.cc
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index a18930a97bc8c4f17695bcac80363c472dbf914b..18154084b305b8f1d1cdff135d75458e4af2eadc 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -1548,7 +1548,8 @@ class StressTransactionsDelegate : public base::PlatformThread::Delegate {
if (rand_action < 4 && !path_name.empty()) {
ReadTransaction trans(FROM_HERE, dir_);
CHECK(1 == CountEntriesWithName(&trans, trans.root_id(), path_name));
- base::PlatformThread::Sleep(rand() % 10);
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
+ rand() % 10));
} else {
std::string unique_name =
base::StringPrintf("%d.%d", thread_number_, entry_count++);
@@ -1556,7 +1557,8 @@ class StressTransactionsDelegate : public base::PlatformThread::Delegate {
WriteTransaction trans(FROM_HERE, UNITTEST, dir_);
MutableEntry e(&trans, CREATE, trans.root_id(), path_name);
CHECK(e.good());
- base::PlatformThread::Sleep(rand() % 20);
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
+ rand() % 20));
e.Put(IS_UNSYNCED, true);
if (e.Put(ID, TestIdFactory::FromNumber(rand())) &&
e.Get(ID).ServerKnows() && !e.Get(ID).IsRoot()) {

Powered by Google App Engine
This is Rietveld 408576698