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

Unified Diff: content/browser/fileapi/file_system_dir_url_request_job_unittest.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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: content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
index 8741cff294b402e3f4dc357130577cb0444a7b2b..dc03b6abc17cff7c5f4d0483355d0df7da703e7d 100644
--- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/browser/fileapi/file_system_dir_url_request_job.h"
+#include "storage/browser/fileapi/file_system_dir_url_request_job.h"
#include <string>
@@ -28,15 +28,15 @@
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/icu/source/i18n/unicode/regex.h"
-#include "webkit/browser/fileapi/external_mount_points.h"
-#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_file_util.h"
-#include "webkit/browser/fileapi/file_system_operation_context.h"
-#include "webkit/browser/fileapi/file_system_url.h"
+#include "storage/browser/fileapi/external_mount_points.h"
+#include "storage/browser/fileapi/file_system_context.h"
+#include "storage/browser/fileapi/file_system_file_util.h"
+#include "storage/browser/fileapi/file_system_operation_context.h"
+#include "storage/browser/fileapi/file_system_url.h"
-using fileapi::FileSystemContext;
-using fileapi::FileSystemOperationContext;
-using fileapi::FileSystemURL;
+using storage::FileSystemContext;
+using storage::FileSystemOperationContext;
+using storage::FileSystemURL;
namespace content {
namespace {
@@ -50,7 +50,7 @@ const char kValidExternalMountPoint[] = "mnt_name";
// "automount", but will only succeed for the mount point "mnt_name".
bool TestAutoMountForURLRequest(
const net::URLRequest* /*url_request*/,
- const fileapi::FileSystemURL& filesystem_url,
+ const storage::FileSystemURL& filesystem_url,
const std::string& storage_domain,
const base::Callback<void(base::File::Error result)>& callback) {
if (storage_domain != "automount")
@@ -61,9 +61,11 @@ bool TestAutoMountForURLRequest(
std::string mount_point = base::FilePath(components[0]).AsUTF8Unsafe();
if (mount_point == kValidExternalMountPoint) {
- fileapi::ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
- kValidExternalMountPoint, fileapi::kFileSystemTypeTest,
- fileapi::FileSystemMountOption(), base::FilePath());
+ storage::ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
+ kValidExternalMountPoint,
+ storage::kFileSystemTypeTest,
+ storage::FileSystemMountOption(),
+ base::FilePath());
callback.Run(base::File::FILE_OK);
} else {
callback.Run(base::File::FILE_ERROR_NOT_FOUND);
@@ -82,7 +84,7 @@ class FileSystemDirURLRequestJobFactory : public net::URLRequestJobFactory {
const std::string& scheme,
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const OVERRIDE {
- return new fileapi::FileSystemDirURLRequestJob(
+ return new storage::FileSystemDirURLRequestJob(
request, network_delegate, storage_domain_, file_system_context_);
}
@@ -120,8 +122,9 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
NULL, temp_dir_.path());
file_system_context_->OpenFileSystem(
- GURL("http://remote/"), fileapi::kFileSystemTypeTemporary,
- fileapi::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
+ GURL("http://remote/"),
+ storage::kFileSystemTypeTemporary,
+ storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
base::Bind(&FileSystemDirURLRequestJobTest::OnOpenFileSystem,
weak_factory_.GetWeakPtr()));
base::RunLoop().RunUntilIdle();
@@ -137,11 +140,11 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
*mnt_point = temp_dir_.path().AppendASCII("auto_mount_dir");
ASSERT_TRUE(base::CreateDirectory(*mnt_point));
- ScopedVector<fileapi::FileSystemBackend> additional_providers;
+ ScopedVector<storage::FileSystemBackend> additional_providers;
additional_providers.push_back(new TestFileSystemBackend(
base::MessageLoopProxy::current().get(), *mnt_point));
- std::vector<fileapi::URLRequestAutoMountHandler> handlers;
+ std::vector<storage::URLRequestAutoMountHandler> handlers;
handlers.push_back(base::Bind(&TestAutoMountForURLRequest));
file_system_context_ = CreateFileSystemContextWithAutoMountersForTesting(
@@ -185,9 +188,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
FileSystemURL CreateURL(const base::FilePath& file_path) {
return file_system_context_->CreateCrackedFileSystemURL(
- GURL("http://remote"),
- fileapi::kFileSystemTypeTemporary,
- file_path);
+ GURL("http://remote"), storage::kFileSystemTypeTemporary, file_path);
}
FileSystemOperationContext* NewOperationContext() {
@@ -268,7 +269,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
return GURL(kFileSystemURLPrefix + path);
}
- fileapi::FileSystemFileUtil* file_util() {
+ storage::FileSystemFileUtil* file_util() {
return file_system_context_->sandbox_delegate()->sync_file_util();
}
@@ -406,7 +407,7 @@ TEST_F(FileSystemDirURLRequestJobTest, AutoMountDirectoryListing) {
VerifyListingEntry(listing_entries[1], "foo", "foo", true, -1);
ASSERT_TRUE(
- fileapi::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
+ storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
kValidExternalMountPoint));
}
@@ -420,7 +421,7 @@ TEST_F(FileSystemDirURLRequestJobTest, AutoMountInvalidRoot) {
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
ASSERT_FALSE(
- fileapi::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
+ storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
"invalid"));
}
@@ -434,7 +435,7 @@ TEST_F(FileSystemDirURLRequestJobTest, AutoMountNoHandler) {
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
ASSERT_FALSE(
- fileapi::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
+ storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
kValidExternalMountPoint));
}

Powered by Google App Engine
This is Rietveld 408576698