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

Unified Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 73252df182f523b42c497d0383845472a9d7c87a..70d212192c4af0146f7a3b685384ab2633b865ea 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -559,7 +559,7 @@ void ExtensionServiceTestBase::InitializeInstalledExtensionService(
path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
EXPECT_TRUE(base::DeleteFile(path, true));
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- EXPECT_TRUE(file_util::CreateDirectoryAndGetError(path, &error)) << error;
+ EXPECT_TRUE(base::CreateDirectoryAndGetError(path, &error)) << error;
base::FilePath temp_prefs = path.Append(FILE_PATH_LITERAL("Preferences"));
EXPECT_TRUE(base::CopyFile(prefs_file, temp_prefs));
@@ -637,14 +637,14 @@ ExtensionServiceTestBase::CreateDefaultInitParamsInTempDir(
path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
EXPECT_TRUE(base::DeleteFile(path, true));
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- EXPECT_TRUE(file_util::CreateDirectoryAndGetError(path, &error)) << error;
+ EXPECT_TRUE(base::CreateDirectoryAndGetError(path, &error)) << error;
base::FilePath prefs_filename =
path.Append(FILE_PATH_LITERAL("TestPreferences"));
base::FilePath extensions_install_dir =
path.Append(FILE_PATH_LITERAL("Extensions"));
EXPECT_TRUE(base::DeleteFile(extensions_install_dir, true));
- EXPECT_TRUE(file_util::CreateDirectoryAndGetError(extensions_install_dir,
- &error)) << error;
+ EXPECT_TRUE(base::CreateDirectoryAndGetError(extensions_install_dir,
+ &error)) << error;
params.profile_path = path;
params.pref_file = prefs_filename;
@@ -4282,7 +4282,7 @@ TEST_F(ExtensionServiceTest, ClearExtensionData) {
profile_->GetPath().AppendASCII("Local Storage");
base::FilePath lso_file_path = lso_dir_path.AppendASCII(origin_id)
.AddExtension(FILE_PATH_LITERAL(".localstorage"));
- EXPECT_TRUE(file_util::CreateDirectory(lso_dir_path));
+ EXPECT_TRUE(base::CreateDirectory(lso_dir_path));
EXPECT_EQ(0, file_util::WriteFile(lso_file_path, NULL, 0));
EXPECT_TRUE(base::PathExists(lso_file_path));
@@ -4294,7 +4294,7 @@ TEST_F(ExtensionServiceTest, ClearExtensionData) {
idb_context->SetTaskRunnerForTesting(
base::MessageLoop::current()->message_loop_proxy().get());
base::FilePath idb_path = idb_context->GetFilePathForTesting(origin_id);
- EXPECT_TRUE(file_util::CreateDirectory(idb_path));
+ EXPECT_TRUE(base::CreateDirectory(idb_path));
EXPECT_TRUE(base::DirectoryExists(idb_path));
// Uninstall the extension.
@@ -4398,7 +4398,7 @@ TEST_F(ExtensionServiceTest, ClearAppData) {
profile_->GetPath().AppendASCII("Local Storage");
base::FilePath lso_file_path = lso_dir_path.AppendASCII(origin_id)
.AddExtension(FILE_PATH_LITERAL(".localstorage"));
- EXPECT_TRUE(file_util::CreateDirectory(lso_dir_path));
+ EXPECT_TRUE(base::CreateDirectory(lso_dir_path));
EXPECT_EQ(0, file_util::WriteFile(lso_file_path, NULL, 0));
EXPECT_TRUE(base::PathExists(lso_file_path));
@@ -4410,7 +4410,7 @@ TEST_F(ExtensionServiceTest, ClearAppData) {
idb_context->SetTaskRunnerForTesting(
base::MessageLoop::current()->message_loop_proxy().get());
base::FilePath idb_path = idb_context->GetFilePathForTesting(origin_id);
- EXPECT_TRUE(file_util::CreateDirectory(idb_path));
+ EXPECT_TRUE(base::CreateDirectory(idb_path));
EXPECT_TRUE(base::DirectoryExists(idb_path));
// Uninstall one of them, unlimited storage should still be granted

Powered by Google App Engine
This is Rietveld 408576698