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

Unified Diff: chrome/test/sync/engine/test_directory_setter_upper.cc

Issue 340055: String cleanup in sync code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/test/sync/engine/test_directory_setter_upper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/sync/engine/test_directory_setter_upper.cc
===================================================================
--- chrome/test/sync/engine/test_directory_setter_upper.cc (revision 30948)
+++ chrome/test/sync/engine/test_directory_setter_upper.cc (working copy)
@@ -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() {}
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 @@
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 @@
TriggeredOpenTestDirectorySetterUpper::TriggeredOpenTestDirectorySetterUpper(
const std::string& name)
- : TestDirectorySetterUpper(UTF8ToPathStringQuick(name)) {
+ : TestDirectorySetterUpper(name) {
}
void TriggeredOpenTestDirectorySetterUpper::SetUp() {
« no previous file with comments | « chrome/test/sync/engine/test_directory_setter_upper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698