Commit 9d31d519 authored by iseki's avatar iseki Committed by Commit bot

Support StreamCopyOrMoveImpl in sandbox.

StreamCopyOrMoveImpl has some issue.
* Return infelicity error code.
* Don't notify to observer.
This issue is fixed in Issue 522543002 so we can support it in sandbox.

BUG=360088
TEST=content_unittests passed

Review URL: https://codereview.chromium.org/541363002

Cr-Commit-Position: refs/heads/master@{#293677}
parent c76ef732
...@@ -612,8 +612,8 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndOverwrite) { ...@@ -612,8 +612,8 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndOverwrite) {
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
EXPECT_EQ(base::File::FILE_OK, status()); EXPECT_EQ(base::File::FILE_OK, status());
EXPECT_TRUE(FileExists("dest")); EXPECT_TRUE(FileExists("dest"));
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count()); EXPECT_EQ(4, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count()); EXPECT_EQ(2, change_observer()->get_and_reset_modify_file_count());
EXPECT_TRUE(change_observer()->HasNoChange()); EXPECT_TRUE(change_observer()->HasNoChange());
} }
...@@ -628,9 +628,10 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndNew) { ...@@ -628,9 +628,10 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndNew) {
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
EXPECT_EQ(base::File::FILE_OK, status()); EXPECT_EQ(base::File::FILE_OK, status());
EXPECT_TRUE(FileExists("new")); EXPECT_TRUE(FileExists("new"));
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count()); EXPECT_EQ(4, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_from_count()); EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
EXPECT_TRUE(change_observer()->HasNoChange()); EXPECT_TRUE(change_observer()->HasNoChange());
} }
...@@ -694,7 +695,8 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcDirRecursive) { ...@@ -694,7 +695,8 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcDirRecursive) {
EXPECT_EQ(2, change_observer()->get_and_reset_create_directory_count()); EXPECT_EQ(2, change_observer()->get_and_reset_create_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_remove_directory_count()); EXPECT_EQ(1, change_observer()->get_and_reset_remove_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_from_count()); EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
EXPECT_TRUE(change_observer()->HasNoChange()); EXPECT_TRUE(change_observer()->HasNoChange());
} }
......
...@@ -128,7 +128,7 @@ bool SandboxFileSystemBackend::SupportsStreaming( ...@@ -128,7 +128,7 @@ bool SandboxFileSystemBackend::SupportsStreaming(
bool SandboxFileSystemBackend::HasInplaceCopyImplementation( bool SandboxFileSystemBackend::HasInplaceCopyImplementation(
storage::FileSystemType type) const { storage::FileSystemType type) const {
return true; return false;
} }
scoped_ptr<storage::FileStreamReader> scoped_ptr<storage::FileStreamReader>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment