diff options
Diffstat (limited to 'chrome/test/sync')
-rw-r--r-- | chrome/test/sync/engine/mock_server_connection.cc | 3 | ||||
-rw-r--r-- | chrome/test/sync/engine/test_directory_setter_upper.cc | 13 | ||||
-rw-r--r-- | chrome/test/sync/engine/test_directory_setter_upper.h | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/chrome/test/sync/engine/mock_server_connection.cc b/chrome/test/sync/engine/mock_server_connection.cc index e4fd70a..c9e3be5 100644 --- a/chrome/test/sync/engine/mock_server_connection.cc +++ b/chrome/test/sync/engine/mock_server_connection.cc @@ -381,8 +381,7 @@ void MockConnectionManager::AddUpdateExtendedAttributes(SyncEntity* ent, for (int i = 0; i < xattr_count; i++) { sync_pb::ExtendedAttributes_ExtendedAttribute* extended_attribute = mutable_extended_attributes->add_extendedattribute(); - extended_attribute->set_key(static_cast<const string&> - (browser_sync::ToUTF8(xattr_key[i]))); + extended_attribute->set_key(xattr_key[i]); SyncerProtoUtil::CopyBlobIntoProtoBytes(xattr_value[i], extended_attribute->mutable_value()); } diff --git a/chrome/test/sync/engine/test_directory_setter_upper.cc b/chrome/test/sync/engine/test_directory_setter_upper.cc index 9e910f0..a41f160 100644 --- a/chrome/test/sync/engine/test_directory_setter_upper.cc +++ b/chrome/test/sync/engine/test_directory_setter_upper.cc @@ -4,11 +4,10 @@ #include "chrome/test/sync/engine/test_directory_setter_upper.h" +#include "base/file_util.h" #include "base/string_util.h" #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/browser/sync/syncable/syncable.h" -#include "chrome/browser/sync/util/character_set_converters.h" -#include "chrome/browser/sync/util/compat_file.h" #include "chrome/browser/sync/util/event_sys-inl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,10 +24,10 @@ TestDirectorySetterUpper::TestDirectorySetterUpper(const PathString& name) TestDirectorySetterUpper::~TestDirectorySetterUpper() {} void TestDirectorySetterUpper::Init() { - PathString test_data_dir_ = PSTR("."); + FilePath test_data_dir_(FILE_PATH_LITERAL(".")); manager_.reset(new DirectoryManager(test_data_dir_)); file_path_ = manager_->GetSyncDataDatabasePath(); - PathRemove(file_path_.c_str()); + file_util::Delete(file_path_, false); } void TestDirectorySetterUpper::SetUp() { @@ -54,8 +53,8 @@ void TestDirectorySetterUpper::TearDown() { manager()->FinalSaveChangesForAll(); manager()->Close(name()); manager_.reset(); - EXPECT_EQ(0, PathRemove(file_path_.c_str())); - file_path_.clear(); + EXPECT_TRUE(file_util::Delete(file_path_, false)); + file_path_ = FilePath(FILE_PATH_LITERAL("")); } void TestDirectorySetterUpper::RunInvariantCheck(const ScopedDirLookup& dir) { @@ -88,7 +87,7 @@ void ManuallyOpenedTestDirectorySetterUpper::TearDown() { TriggeredOpenTestDirectorySetterUpper::TriggeredOpenTestDirectorySetterUpper( const std::string& name) - : TestDirectorySetterUpper(UTF8ToPathStringQuick(name)) { + : TestDirectorySetterUpper(name) { } void TriggeredOpenTestDirectorySetterUpper::SetUp() { diff --git a/chrome/test/sync/engine/test_directory_setter_upper.h b/chrome/test/sync/engine/test_directory_setter_upper.h index 3c8936a..7e2cf48 100644 --- a/chrome/test/sync/engine/test_directory_setter_upper.h +++ b/chrome/test/sync/engine/test_directory_setter_upper.h @@ -68,7 +68,7 @@ class TestDirectorySetterUpper { scoped_ptr<syncable::DirectoryManager> manager_; const PathString name_; - PathString file_path_; + FilePath file_path_; }; // A variant of the above where SetUp does not actually open the directory. |