Index: chrome/browser/sync/engine/apply_updates_command_unittest.cc |
diff --git a/chrome/browser/sync/engine/apply_updates_command_unittest.cc b/chrome/browser/sync/engine/apply_updates_command_unittest.cc |
index 8bceb3906e9815e04a282678c1cfa5f9c5d19c38..1e091b1c8a760691482386df80dfae65a861c4a5 100644 |
--- a/chrome/browser/sync/engine/apply_updates_command_unittest.cc |
+++ b/chrome/browser/sync/engine/apply_updates_command_unittest.cc |
@@ -6,6 +6,7 @@ |
#include "base/format_macros.h" |
#include "base/stringprintf.h" |
+#include "base/tracked.h" |
#include "chrome/browser/sync/engine/apply_updates_command.h" |
#include "chrome/browser/sync/engine/syncer.h" |
#include "chrome/browser/sync/engine/syncer_util.h" |
@@ -55,7 +56,7 @@ class ApplyUpdatesCommandTest : public SyncerCommandTest { |
const string& parent_id) { |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__); |
+ WriteTransaction trans(dir, UNITTEST, FROM_HERE); |
MutableEntry entry(&trans, syncable::CREATE_NEW_UPDATE_ITEM, |
Id::CreateFromServerId(item_id)); |
ASSERT_TRUE(entry.good()); |
@@ -76,7 +77,7 @@ class ApplyUpdatesCommandTest : public SyncerCommandTest { |
bool is_unique) { |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__); |
+ WriteTransaction trans(dir, UNITTEST, FROM_HERE); |
MutableEntry entry(&trans, syncable::CREATE_NEW_UPDATE_ITEM, |
Id::CreateFromServerId(item_id)); |
ASSERT_TRUE(entry.good()); |
@@ -102,7 +103,7 @@ class ApplyUpdatesCommandTest : public SyncerCommandTest { |
int64* metahandle_out) { |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__); |
+ WriteTransaction trans(dir, UNITTEST, FROM_HERE); |
Id predecessor_id = dir->GetLastChildId(&trans, parent_id); |
MutableEntry entry(&trans, syncable::CREATE, parent_id, name); |
ASSERT_TRUE(entry.good()); |
@@ -221,7 +222,7 @@ TEST_F(ApplyUpdatesCommandTest, DecryptablePassword) { |
// know it's safe. |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
cryptographer = |
session()->context()->directory_manager()->GetCryptographer(&trans); |
} |
@@ -285,7 +286,7 @@ TEST_F(ApplyUpdatesCommandTest, SomeUndecryptablePassword) { |
{ |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
Cryptographer* cryptographer = |
session()->context()->directory_manager()->GetCryptographer(&trans); |
@@ -342,7 +343,7 @@ TEST_F(ApplyUpdatesCommandTest, NigoriUpdate) { |
{ |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
cryptographer = |
session()->context()->directory_manager()->GetCryptographer(&trans); |
EXPECT_EQ(encrypted_types, cryptographer->GetEncryptedTypes()); |
@@ -387,7 +388,7 @@ TEST_F(ApplyUpdatesCommandTest, EncryptUnsyncedChanges) { |
{ |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
cryptographer = |
session()->context()->directory_manager()->GetCryptographer(&trans); |
EXPECT_EQ(encrypted_types, cryptographer->GetEncryptedTypes()); |
@@ -438,7 +439,7 @@ TEST_F(ApplyUpdatesCommandTest, EncryptUnsyncedChanges) { |
// Ensure we have unsynced nodes that aren't properly encrypted. |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
EXPECT_FALSE(VerifyUnsyncedChangesAreEncrypted(&trans, encrypted_types)); |
Syncer::UnsyncedMetaHandles handles; |
@@ -463,7 +464,7 @@ TEST_F(ApplyUpdatesCommandTest, EncryptUnsyncedChanges) { |
{ |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
// If ProcessUnsyncedChangesForEncryption worked, all our unsynced changes |
// should be encrypted now. |
@@ -485,7 +486,7 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) { |
{ |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
cryptographer = |
session()->context()->directory_manager()->GetCryptographer(&trans); |
EXPECT_EQ(encrypted_types, cryptographer->GetEncryptedTypes()); |
@@ -538,7 +539,7 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) { |
// Ensure we have unsynced nodes that aren't properly encrypted. |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
EXPECT_FALSE(VerifyUnsyncedChangesAreEncrypted(&trans, encrypted_types)); |
Syncer::UnsyncedMetaHandles handles; |
SyncerUtil::GetUnsyncedEntries(&trans, &handles); |
@@ -565,7 +566,7 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) { |
// Ensure the unsynced nodes are still not encrypted. |
ScopedDirLookup dir(syncdb()->manager(), syncdb()->name()); |
ASSERT_TRUE(dir.good()); |
- ReadTransaction trans(dir, __FILE__, __LINE__); |
+ ReadTransaction trans(dir, FROM_HERE); |
// Since we're in conflict, the specifics don't reflect the unapplied |
// changes. |