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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build 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: chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
index ca4c83d39717231b27750e6a6643406569131506..066394f4f9f0f385da710526e573493e7975153c 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
@@ -32,9 +32,9 @@
#define FPL FILE_PATH_LITERAL
using content::BrowserThread;
-using fileapi::FileSystemContext;
-using fileapi::FileSystemURL;
-using fileapi::FileSystemURLSet;
+using storage::FileSystemContext;
+using storage::FileSystemURL;
+using storage::FileSystemURLSet;
// This tests LocalFileSyncContext behavior in multi-thread /
// multi-file-system-context environment.
@@ -81,7 +81,7 @@ class LocalFileSyncContextTest : public testing::Test {
LocalFileSyncContext::SyncMode sync_mode,
SyncFileMetadata* metadata,
FileChangeList* changes,
- webkit_blob::ScopedFile* snapshot) {
+ storage::ScopedFile* snapshot) {
ASSERT_TRUE(changes != NULL);
ASSERT_FALSE(has_inflight_prepare_for_sync_);
status_ = SYNC_STATUS_UNKNOWN;
@@ -99,7 +99,7 @@ class LocalFileSyncContextTest : public testing::Test {
LocalFileSyncContext::SyncMode sync_mode,
SyncFileMetadata* metadata,
FileChangeList* changes,
- webkit_blob::ScopedFile* snapshot) {
+ storage::ScopedFile* snapshot) {
StartPrepareForSync(file_system_context, url, sync_mode,
metadata, changes, snapshot);
base::MessageLoop::current()->Run();
@@ -112,7 +112,7 @@ class LocalFileSyncContextTest : public testing::Test {
LocalFileSyncContext::SyncMode sync_mode,
SyncFileMetadata* metadata,
FileChangeList* changes,
- webkit_blob::ScopedFile* snapshot) {
+ storage::ScopedFile* snapshot) {
return base::Bind(&LocalFileSyncContextTest::StartPrepareForSync,
base::Unretained(this),
base::Unretained(file_system_context),
@@ -121,10 +121,10 @@ class LocalFileSyncContextTest : public testing::Test {
void DidPrepareForSync(SyncFileMetadata* metadata_out,
FileChangeList* changes_out,
- webkit_blob::ScopedFile* snapshot_out,
+ storage::ScopedFile* snapshot_out,
SyncStatusCode status,
const LocalFileSyncInfo& sync_file_info,
- webkit_blob::ScopedFile snapshot) {
+ storage::ScopedFile snapshot) {
ASSERT_TRUE(ui_task_runner_->RunsTasksOnCurrentThread());
has_inflight_prepare_for_sync_ = false;
status_ = status;
@@ -299,7 +299,7 @@ class LocalFileSyncContextTest : public testing::Test {
SyncFileMetadata metadata;
FileChangeList changes;
- webkit_blob::ScopedFile snapshot;
+ storage::ScopedFile snapshot;
EXPECT_EQ(SYNC_STATUS_OK,
PrepareForSync(file_system.file_system_context(), kFile,
sync_mode, &metadata, &changes, &snapshot));
@@ -612,7 +612,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
// Record the initial usage (likely 0).
int64 initial_usage = -1;
int64 quota = -1;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&initial_usage, &quota));
// Create a file and directory in the file_system.
@@ -638,7 +638,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
// At this point the usage must be greater than the initial usage.
int64 new_usage = -1;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_GT(new_usage, initial_usage);
@@ -674,7 +674,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
EXPECT_TRUE(urls.empty());
// The quota usage data must have reflected the deletion.
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_EQ(new_usage, initial_usage);
@@ -700,7 +700,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion_ForRoot) {
// Record the initial usage (likely 0).
int64 initial_usage = -1;
int64 quota = -1;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&initial_usage, &quota));
// Create a file and directory in the file_system.
@@ -714,7 +714,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion_ForRoot) {
// At this point the usage must be greater than the initial usage.
int64 new_usage = -1;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_GT(new_usage, initial_usage);
@@ -741,7 +741,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion_ForRoot) {
EXPECT_TRUE(urls.empty());
// The quota usage data must have reflected the deletion.
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_EQ(new_usage, initial_usage);
@@ -807,7 +807,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
// Record the usage.
int64 usage = -1, new_usage = -1;
int64 quota = -1;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&usage, &quota));
// Here in the local filesystem we have:
@@ -834,7 +834,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
// Check if the usage has been increased by (kTestFileData1 - kTestFileData0).
const int updated_size =
arraysize(kTestFileData1) - arraysize(kTestFileData0);
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_EQ(updated_size, new_usage - usage);
@@ -881,7 +881,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
// Creating a file/directory must have increased the usage more than
// the size of kTestFileData2.
new_usage = usage;
- EXPECT_EQ(quota::kQuotaStatusOk,
+ EXPECT_EQ(storage::kQuotaStatusOk,
file_system.GetUsageAndQuota(&new_usage, &quota));
EXPECT_GT(new_usage,
static_cast<int64>(usage + arraysize(kTestFileData2) - 1));

Powered by Google App Engine
This is Rietveld 408576698