summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 14:29:49 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 14:29:49 +0000
commitc5a3d375d81b81773e6fdd3d8cca665412f2a1c4 (patch)
tree84f78c876dc02be7a9eebae0c8bcf8e9b80fd2bc /webkit
parent84ae54f441ee15e228ca2c6fdd4b7bc270ed5424 (diff)
downloadchromium_src-c5a3d375d81b81773e6fdd3d8cca665412f2a1c4.zip
chromium_src-c5a3d375d81b81773e6fdd3d8cca665412f2a1c4.tar.gz
chromium_src-c5a3d375d81b81773e6fdd3d8cca665412f2a1c4.tar.bz2
Move fileapi files to content/child/fileapi/
BUG=265753 TEST=content_unittests R=ericu@chromium.org,kinuko@chromium.org,jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/22850004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/renderer/fileapi/OWNERS1
-rw-r--r--webkit/renderer/fileapi/webfilewriter_base.cc154
-rw-r--r--webkit/renderer/fileapi/webfilewriter_base.h71
-rw-r--r--webkit/renderer/fileapi/webfilewriter_base_unittest.cc411
-rw-r--r--webkit/renderer/webkit_storage_renderer_export.h29
-rw-r--r--webkit/storage_renderer.gyp29
-rw-r--r--webkit/support/webkit_support.gypi1
7 files changed, 0 insertions, 696 deletions
diff --git a/webkit/renderer/fileapi/OWNERS b/webkit/renderer/fileapi/OWNERS
deleted file mode 100644
index 13c3288..0000000
--- a/webkit/renderer/fileapi/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-ericu@chromium.org
diff --git a/webkit/renderer/fileapi/webfilewriter_base.cc b/webkit/renderer/fileapi/webfilewriter_base.cc
deleted file mode 100644
index 92c7ae1..0000000
--- a/webkit/renderer/fileapi/webfilewriter_base.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/renderer/fileapi/webfilewriter_base.h"
-
-#include "base/logging.h"
-#include "third_party/WebKit/public/platform/WebURL.h"
-#include "third_party/WebKit/public/web/WebFileError.h"
-#include "third_party/WebKit/public/web/WebFileWriterClient.h"
-#include "webkit/common/fileapi/file_system_util.h"
-
-namespace fileapi {
-
-WebFileWriterBase::WebFileWriterBase(
- const GURL& path, WebKit::WebFileWriterClient* client)
- : path_(path),
- client_(client),
- operation_(kOperationNone),
- cancel_state_(kCancelNotInProgress) {
-}
-
-WebFileWriterBase::~WebFileWriterBase() {
-}
-
-void WebFileWriterBase::truncate(long long length) {
- DCHECK(kOperationNone == operation_);
- DCHECK(kCancelNotInProgress == cancel_state_);
- operation_ = kOperationTruncate;
- DoTruncate(path_, length);
-}
-
-void WebFileWriterBase::write(
- long long position,
- const WebKit::WebURL& blob_url) {
- DCHECK(kOperationNone == operation_);
- DCHECK(kCancelNotInProgress == cancel_state_);
- operation_ = kOperationWrite;
- DoWrite(path_, blob_url, position);
-}
-
-// When we cancel a write/truncate, we always get back the result of the write
-// before the result of the cancel, no matter what happens.
-// So we'll get back either
-// success [of the write/truncate, in a DidWrite(XXX, true)/DidSucceed() call]
-// followed by failure [of the cancel]; or
-// failure [of the write, either from cancel or other reasons] followed by
-// the result of the cancel.
-// In the write case, there could also be queued up non-terminal DidWrite calls
-// before any of that comes back, but there will always be a terminal write
-// response [success or failure] after them, followed by the cancel result, so
-// we can ignore non-terminal write responses, take the terminal write success
-// or the first failure as the last write response, then know that the next
-// thing to come back is the cancel response. We only notify the
-// AsyncFileWriterClient when it's all over.
-void WebFileWriterBase::cancel() {
- // Check for the cancel passing the previous operation's return in-flight.
- if (kOperationWrite != operation_ && kOperationTruncate != operation_)
- return;
- if (kCancelNotInProgress != cancel_state_)
- return;
- cancel_state_ = kCancelSent;
- DoCancel();
-}
-
-void WebFileWriterBase::DidFinish(base::PlatformFileError error_code) {
- if (error_code == base::PLATFORM_FILE_OK)
- DidSucceed();
- else
- DidFail(error_code);
-}
-
-void WebFileWriterBase::DidWrite(int64 bytes, bool complete) {
- DCHECK(kOperationWrite == operation_);
- switch (cancel_state_) {
- case kCancelNotInProgress:
- if (complete)
- operation_ = kOperationNone;
- client_->didWrite(bytes, complete);
- break;
- case kCancelSent:
- // This is the success call of the write, which we'll eat, even though
- // it succeeded before the cancel got there. We accepted the cancel call,
- // so the write will eventually return an error.
- if (complete)
- cancel_state_ = kCancelReceivedWriteResponse;
- break;
- case kCancelReceivedWriteResponse:
- default:
- NOTREACHED();
- }
-}
-
-void WebFileWriterBase::DidSucceed() {
- // Write never gets a DidSucceed call, so this is either a cancel or truncate
- // response.
- switch (cancel_state_) {
- case kCancelNotInProgress:
- // A truncate succeeded, with no complications.
- DCHECK(kOperationTruncate == operation_);
- operation_ = kOperationNone;
- client_->didTruncate();
- break;
- case kCancelSent:
- DCHECK(kOperationTruncate == operation_);
- // This is the success call of the truncate, which we'll eat, even though
- // it succeeded before the cancel got there. We accepted the cancel call,
- // so the truncate will eventually return an error.
- cancel_state_ = kCancelReceivedWriteResponse;
- break;
- case kCancelReceivedWriteResponse:
- // This is the success of the cancel operation.
- FinishCancel();
- break;
- default:
- NOTREACHED();
- }
-}
-
-void WebFileWriterBase::DidFail(base::PlatformFileError error_code) {
- DCHECK(kOperationNone != operation_);
- switch (cancel_state_) {
- case kCancelNotInProgress:
- // A write or truncate failed.
- operation_ = kOperationNone;
- client_->didFail(
- PlatformFileErrorToWebFileError(error_code));
- break;
- case kCancelSent:
- // This is the failure of a write or truncate; the next message should be
- // the result of the cancel. We don't assume that it'll be a success, as
- // the write/truncate could have failed for other reasons.
- cancel_state_ = kCancelReceivedWriteResponse;
- break;
- case kCancelReceivedWriteResponse:
- // The cancel reported failure, meaning that the write or truncate
- // finished before the cancel got there. But we suppressed the
- // write/truncate's response, and will now report that it was cancelled.
- FinishCancel();
- break;
- default:
- NOTREACHED();
- }
-}
-
-void WebFileWriterBase::FinishCancel() {
- DCHECK(kCancelReceivedWriteResponse == cancel_state_);
- DCHECK(kOperationNone != operation_);
- cancel_state_ = kCancelNotInProgress;
- operation_ = kOperationNone;
- client_->didFail(WebKit::WebFileErrorAbort);
-}
-
-} // namespace fileapi
diff --git a/webkit/renderer/fileapi/webfilewriter_base.h b/webkit/renderer/fileapi/webfilewriter_base.h
deleted file mode 100644
index dc1d730..0000000
--- a/webkit/renderer/fileapi/webfilewriter_base.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_RENDERER_FILEAPI_WEBFILEWRITER_BASE_H_
-#define WEBKIT_RENDERER_FILEAPI_WEBFILEWRITER_BASE_H_
-
-#include "base/platform_file.h"
-#include "third_party/WebKit/public/web/WebFileWriter.h"
-#include "url/gurl.h"
-#include "webkit/renderer/webkit_storage_renderer_export.h"
-
-namespace WebKit {
-class WebFileWriterClient;
-class WebURL;
-}
-
-namespace fileapi {
-
-class WEBKIT_STORAGE_RENDERER_EXPORT WebFileWriterBase
- : public NON_EXPORTED_BASE(WebKit::WebFileWriter) {
- public:
- WebFileWriterBase(
- const GURL& path, WebKit::WebFileWriterClient* client);
- virtual ~WebFileWriterBase();
-
- // WebFileWriter implementation
- virtual void truncate(long long length);
- virtual void write(long long position, const WebKit::WebURL& blobURL);
- virtual void cancel();
-
- protected:
- // This calls DidSucceed() or DidFail() based on the value of |error_code|.
- void DidFinish(base::PlatformFileError error_code);
-
- void DidWrite(int64 bytes, bool complete);
- void DidSucceed();
- void DidFail(base::PlatformFileError error_code);
-
- // Derived classes must provide these methods to asynchronously perform
- // the requested operation, and they must call the appropiate DidSomething
- // method upon completion and as progress is made in the Write case.
- virtual void DoTruncate(const GURL& path, int64 offset) = 0;
- virtual void DoWrite(const GURL& path, const GURL& blob_url,
- int64 offset) = 0;
- virtual void DoCancel() = 0;
-
- private:
- enum OperationType {
- kOperationNone,
- kOperationWrite,
- kOperationTruncate
- };
-
- enum CancelState {
- kCancelNotInProgress,
- kCancelSent,
- kCancelReceivedWriteResponse,
- };
-
- void FinishCancel();
-
- GURL path_;
- WebKit::WebFileWriterClient* client_;
- OperationType operation_;
- CancelState cancel_state_;
-};
-
-} // namespace fileapi
-
-#endif // WEBKIT_RENDERER_FILEAPI_WEBFILEWRITER_BASE_H_
diff --git a/webkit/renderer/fileapi/webfilewriter_base_unittest.cc b/webkit/renderer/fileapi/webfilewriter_base_unittest.cc
deleted file mode 100644
index d706738..0000000
--- a/webkit/renderer/fileapi/webfilewriter_base_unittest.cc
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/renderer/fileapi/webfilewriter_base.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
-#include "base/strings/utf_string_conversions.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/WebKit/public/platform/WebURL.h"
-#include "third_party/WebKit/public/web/WebFileError.h"
-#include "third_party/WebKit/public/web/WebFileWriterClient.h"
-#include "url/gurl.h"
-
-namespace fileapi {
-
-namespace {
-
-// We use particular offsets to trigger particular behaviors
-// in the TestableFileWriter.
-const int kNoOffset = -1;
-const int kBasicFileTruncate_Offset = 1;
-const int kErrorFileTruncate_Offset = 2;
-const int kCancelFileTruncate_Offset = 3;
-const int kCancelFailedTruncate_Offset = 4;
-const int kBasicFileWrite_Offset = 1;
-const int kErrorFileWrite_Offset = 2;
-const int kMultiFileWrite_Offset = 3;
-const int kCancelFileWriteBeforeCompletion_Offset = 4;
-const int kCancelFileWriteAfterCompletion_Offset = 5;
-
-GURL mock_path_as_gurl() {
- return GURL("MockPath");
-}
-
-} // namespace
-
-class TestableFileWriter : public WebFileWriterBase {
- public:
- explicit TestableFileWriter(WebKit::WebFileWriterClient* client)
- : WebFileWriterBase(mock_path_as_gurl(), client) {
- reset();
- }
-
- void reset() {
- received_truncate_ = false;
- received_truncate_path_ = GURL();
- received_truncate_offset_ = kNoOffset;
- received_write_ = false;
- received_write_path_ = GURL();
- received_write_offset_ = kNoOffset;
- received_write_blob_url_ = GURL();
- received_cancel_ = false;
- }
-
- bool received_truncate_;
- GURL received_truncate_path_;
- int64 received_truncate_offset_;
- bool received_write_;
- GURL received_write_path_;
- GURL received_write_blob_url_;
- int64 received_write_offset_;
- bool received_cancel_;
-
- protected:
- virtual void DoTruncate(const GURL& path, int64 offset) OVERRIDE {
- received_truncate_ = true;
- received_truncate_path_ = path;
- received_truncate_offset_ = offset;
-
- if (offset == kBasicFileTruncate_Offset) {
- DidSucceed();
- } else if (offset == kErrorFileTruncate_Offset) {
- DidFail(base::PLATFORM_FILE_ERROR_NOT_FOUND);
- } else if (offset == kCancelFileTruncate_Offset) {
- cancel();
- DidSucceed(); // truncate completion
- DidSucceed(); // cancel completion
- } else if (offset == kCancelFailedTruncate_Offset) {
- cancel();
- DidFail(base::PLATFORM_FILE_ERROR_NOT_FOUND); // truncate completion
- DidSucceed(); // cancel completion
- } else {
- FAIL();
- }
- }
-
- virtual void DoWrite(const GURL& path, const GURL& blob_url,
- int64 offset) OVERRIDE {
- received_write_ = true;
- received_write_path_ = path;
- received_write_offset_ = offset;
- received_write_blob_url_ = blob_url;
-
- if (offset == kBasicFileWrite_Offset) {
- DidWrite(1, true);
- } else if (offset == kErrorFileWrite_Offset) {
- DidFail(base::PLATFORM_FILE_ERROR_NOT_FOUND);
- } else if (offset == kMultiFileWrite_Offset) {
- DidWrite(1, false);
- DidWrite(1, false);
- DidWrite(1, true);
- } else if (offset == kCancelFileWriteBeforeCompletion_Offset) {
- DidWrite(1, false);
- cancel();
- DidWrite(1, false);
- DidWrite(1, false);
- DidFail(base::PLATFORM_FILE_ERROR_FAILED); // write completion
- DidSucceed(); // cancel completion
- } else if (offset == kCancelFileWriteAfterCompletion_Offset) {
- DidWrite(1, false);
- cancel();
- DidWrite(1, false);
- DidWrite(1, false);
- DidWrite(1, true); // write completion
- DidFail(base::PLATFORM_FILE_ERROR_FAILED); // cancel completion
- } else {
- FAIL();
- }
- }
-
- virtual void DoCancel() OVERRIDE {
- received_cancel_ = true;
- }
-};
-
-class FileWriterTest : public testing::Test,
- public WebKit::WebFileWriterClient {
- public:
- FileWriterTest() {
- reset();
- }
-
- WebKit::WebFileWriter* writer() {
- return testable_writer_.get();
- }
-
- // WebFileWriterClient overrides
- virtual void didWrite(long long bytes, bool complete) {
- EXPECT_FALSE(received_did_write_complete_);
- ++received_did_write_count_;
- received_did_write_bytes_total_ += bytes;
- if (complete)
- received_did_write_complete_ = true;
-
- if (delete_in_client_callback_)
- testable_writer_.reset(NULL);
- }
-
- virtual void didTruncate() {
- EXPECT_FALSE(received_did_truncate_);
- received_did_truncate_ = true;
- if (delete_in_client_callback_)
- testable_writer_.reset(NULL);
- }
-
- virtual void didFail(WebKit::WebFileError error) {
- EXPECT_FALSE(received_did_fail_);
- received_did_fail_ = true;
- fail_error_received_ = error;
- if (delete_in_client_callback_)
- testable_writer_.reset(NULL);
- }
-
- protected:
- void reset() {
- testable_writer_.reset(new TestableFileWriter(this));
- delete_in_client_callback_ = false;
- received_did_write_count_ = 0;
- received_did_write_bytes_total_ = 0;
- received_did_write_complete_ = false;
- received_did_truncate_ = false;
- received_did_fail_ = false;
- fail_error_received_ = static_cast<WebKit::WebFileError>(0);
- }
-
- scoped_ptr<TestableFileWriter> testable_writer_;
- bool delete_in_client_callback_;
-
- // Observed WebFileWriterClient artifacts.
- int received_did_write_count_;
- long long received_did_write_bytes_total_;
- bool received_did_write_complete_;
- bool received_did_truncate_;
- bool received_did_fail_;
- WebKit::WebFileError fail_error_received_;
-
- DISALLOW_COPY_AND_ASSIGN(FileWriterTest);
-};
-
-TEST_F(FileWriterTest, BasicFileWrite) {
- // Call the webkit facing api.
- const GURL kBlobUrl("blob://bloburl/");
- writer()->write(kBasicFileWrite_Offset, kBlobUrl);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_write_);
- EXPECT_EQ(testable_writer_->received_write_path_,
- mock_path_as_gurl());
- EXPECT_EQ(kBasicFileWrite_Offset,
- testable_writer_->received_write_offset_);
- EXPECT_EQ(kBlobUrl, testable_writer_->received_write_blob_url_);
- EXPECT_FALSE(testable_writer_->received_truncate_);
- EXPECT_FALSE(testable_writer_->received_cancel_);
-
- // Check that the client gets called correctly.
- EXPECT_EQ(1, received_did_write_count_);
- EXPECT_TRUE(received_did_write_complete_);
- EXPECT_EQ(1, received_did_write_bytes_total_);
- EXPECT_FALSE(received_did_truncate_);
- EXPECT_FALSE(received_did_fail_);
-}
-
-TEST_F(FileWriterTest, BasicFileTruncate) {
- // Call the webkit facing api.
- writer()->truncate(kBasicFileTruncate_Offset);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_truncate_);
- EXPECT_EQ(mock_path_as_gurl(),
- testable_writer_->received_truncate_path_);
- EXPECT_EQ(kBasicFileTruncate_Offset,
- testable_writer_->received_truncate_offset_);
- EXPECT_FALSE(testable_writer_->received_write_);
- EXPECT_FALSE(testable_writer_->received_cancel_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_truncate_);
- EXPECT_EQ(0, received_did_write_count_);
- EXPECT_FALSE(received_did_fail_);
-}
-
-TEST_F(FileWriterTest, ErrorFileWrite) {
- // Call the webkit facing api.
- const GURL kBlobUrl("blob://bloburl/");
- writer()->write(kErrorFileWrite_Offset, kBlobUrl);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_write_);
- EXPECT_EQ(testable_writer_->received_write_path_,
- mock_path_as_gurl());
- EXPECT_EQ(kErrorFileWrite_Offset,
- testable_writer_->received_write_offset_);
- EXPECT_EQ(kBlobUrl, testable_writer_->received_write_blob_url_);
- EXPECT_FALSE(testable_writer_->received_truncate_);
- EXPECT_FALSE(testable_writer_->received_cancel_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorNotFound, fail_error_received_);
- EXPECT_EQ(0, received_did_write_count_);
- EXPECT_FALSE(received_did_truncate_);
-}
-
-TEST_F(FileWriterTest, ErrorFileTruncate) {
- // Call the webkit facing api.
- writer()->truncate(kErrorFileTruncate_Offset);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_truncate_);
- EXPECT_EQ(mock_path_as_gurl(),
- testable_writer_->received_truncate_path_);
- EXPECT_EQ(kErrorFileTruncate_Offset,
- testable_writer_->received_truncate_offset_);
- EXPECT_FALSE(testable_writer_->received_write_);
- EXPECT_FALSE(testable_writer_->received_cancel_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorNotFound, fail_error_received_);
- EXPECT_FALSE(received_did_truncate_);
- EXPECT_EQ(0, received_did_write_count_);
-}
-
-TEST_F(FileWriterTest, MultiFileWrite) {
- // Call the webkit facing api.
- const GURL kBlobUrl("blob://bloburl/");
- writer()->write(kMultiFileWrite_Offset, kBlobUrl);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_write_);
- EXPECT_EQ(testable_writer_->received_write_path_,
- mock_path_as_gurl());
- EXPECT_EQ(kMultiFileWrite_Offset,
- testable_writer_->received_write_offset_);
- EXPECT_EQ(kBlobUrl, testable_writer_->received_write_blob_url_);
- EXPECT_FALSE(testable_writer_->received_truncate_);
- EXPECT_FALSE(testable_writer_->received_cancel_);
-
- // Check that the client gets called correctly.
- EXPECT_EQ(3, received_did_write_count_);
- EXPECT_TRUE(received_did_write_complete_);
- EXPECT_EQ(3, received_did_write_bytes_total_);
- EXPECT_FALSE(received_did_truncate_);
- EXPECT_FALSE(received_did_fail_);
-}
-
-TEST_F(FileWriterTest, CancelFileWriteBeforeCompletion) {
- // Call the webkit facing api.
- const GURL kBlobUrl("blob://bloburl/");
- writer()->write(kCancelFileWriteBeforeCompletion_Offset, kBlobUrl);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_write_);
- EXPECT_EQ(testable_writer_->received_write_path_,
- mock_path_as_gurl());
- EXPECT_EQ(kCancelFileWriteBeforeCompletion_Offset,
- testable_writer_->received_write_offset_);
- EXPECT_EQ(kBlobUrl, testable_writer_->received_write_blob_url_);
- EXPECT_TRUE(testable_writer_->received_cancel_);
- EXPECT_FALSE(testable_writer_->received_truncate_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_);
- EXPECT_EQ(1, received_did_write_count_);
- EXPECT_FALSE(received_did_write_complete_);
- EXPECT_EQ(1, received_did_write_bytes_total_);
- EXPECT_FALSE(received_did_truncate_);
-}
-
-TEST_F(FileWriterTest, CancelFileWriteAfterCompletion) {
- // Call the webkit facing api.
- const GURL kBlobUrl("blob://bloburl/");
- writer()->write(kCancelFileWriteAfterCompletion_Offset, kBlobUrl);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_write_);
- EXPECT_EQ(testable_writer_->received_write_path_,
- mock_path_as_gurl());
- EXPECT_EQ(kCancelFileWriteAfterCompletion_Offset,
- testable_writer_->received_write_offset_);
- EXPECT_EQ(kBlobUrl, testable_writer_->received_write_blob_url_);
- EXPECT_TRUE(testable_writer_->received_cancel_);
- EXPECT_FALSE(testable_writer_->received_truncate_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_);
- EXPECT_EQ(1, received_did_write_count_);
- EXPECT_FALSE(received_did_write_complete_);
- EXPECT_EQ(1, received_did_write_bytes_total_);
- EXPECT_FALSE(received_did_truncate_);
-}
-
-TEST_F(FileWriterTest, CancelFileTruncate) {
- // Call the webkit facing api.
- writer()->truncate(kCancelFileTruncate_Offset);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_truncate_);
- EXPECT_EQ(mock_path_as_gurl(),
- testable_writer_->received_truncate_path_);
- EXPECT_EQ(kCancelFileTruncate_Offset,
- testable_writer_->received_truncate_offset_);
- EXPECT_TRUE(testable_writer_->received_cancel_);
- EXPECT_FALSE(testable_writer_->received_write_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_);
- EXPECT_FALSE(received_did_truncate_);
- EXPECT_EQ(0, received_did_write_count_);
-}
-
-TEST_F(FileWriterTest, CancelFailedTruncate) {
- // Call the webkit facing api.
- writer()->truncate(kCancelFailedTruncate_Offset);
-
- // Check that the derived class gets called correctly.
- EXPECT_TRUE(testable_writer_->received_truncate_);
- EXPECT_EQ(mock_path_as_gurl(),
- testable_writer_->received_truncate_path_);
- EXPECT_EQ(kCancelFailedTruncate_Offset,
- testable_writer_->received_truncate_offset_);
- EXPECT_TRUE(testable_writer_->received_cancel_);
- EXPECT_FALSE(testable_writer_->received_write_);
-
- // Check that the client gets called correctly.
- EXPECT_TRUE(received_did_fail_);
- EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_);
- EXPECT_FALSE(received_did_truncate_);
- EXPECT_EQ(0, received_did_write_count_);
-}
-
-TEST_F(FileWriterTest, DeleteInCompletionCallbacks) {
- delete_in_client_callback_ = true;
- writer()->write(kBasicFileWrite_Offset, GURL("blob://bloburl/"));
- EXPECT_FALSE(testable_writer_.get());
-
- reset();
- delete_in_client_callback_ = true;
- writer()->truncate(kBasicFileTruncate_Offset);
- EXPECT_FALSE(testable_writer_.get());
-
- reset();
- delete_in_client_callback_ = true;
- writer()->write(kErrorFileWrite_Offset, GURL("blob://bloburl/"));
- EXPECT_FALSE(testable_writer_.get());
-
- reset();
- delete_in_client_callback_ = true;
- writer()->truncate(kErrorFileTruncate_Offset);
- EXPECT_FALSE(testable_writer_.get());
-
- // Not crashing counts as passing.
-}
-
-} // namespace fileapi
diff --git a/webkit/renderer/webkit_storage_renderer_export.h b/webkit/renderer/webkit_storage_renderer_export.h
deleted file mode 100644
index 4225bc6..0000000
--- a/webkit/renderer/webkit_storage_renderer_export.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_RENDERER_WEBKIT_STORAGE_RENDERER_EXPORT_H_
-#define WEBKIT_RENDERER_WEBKIT_STORAGE_RENDERER_EXPORT_H_
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(WEBKIT_STORAGE_RENDERER_IMPLEMENTATION)
-#define WEBKIT_STORAGE_RENDERER_EXPORT __declspec(dllexport)
-#else
-#define WEBKIT_STORAGE_RENDERER_EXPORT __declspec(dllimport)
-#endif // defined(WEBKIT_STORAGE_RENDERER_IMPLEMENTATION)
-
-#else // defined(WIN32)
-#if defined(WEBKIT_STORAGE_RENDERER_IMPLEMENTATION)
-#define WEBKIT_STORAGE_RENDERER_EXPORT __attribute__((visibility("default")))
-#else
-#define WEBKIT_STORAGE_RENDERER_EXPORT
-#endif
-#endif
-
-#else // defined(COMPONENT_BUILD)
-#define WEBKIT_STORAGE_RENDERER_EXPORT
-#endif
-
-#endif // WEBKIT_RENDERER_WEBKIT_STORAGE_RENDERER_EXPORT_H_
diff --git a/webkit/storage_renderer.gyp b/webkit/storage_renderer.gyp
deleted file mode 100644
index dc406e20..0000000
--- a/webkit/storage_renderer.gyp
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'webkit_storage_renderer',
- 'type': '<(component)',
- 'variables': { 'enable_wexit_time_destructors': 1, },
- 'dependencies': [
- '<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink',
- '<(DEPTH)/url/url.gyp:url_lib',
- '<(DEPTH)/webkit/common/webkit_common.gyp:webkit_common',
- '<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
- ],
- 'defines': ['WEBKIT_STORAGE_RENDERER_IMPLEMENTATION'],
- 'sources': [
- 'renderer/webkit_storage_renderer_export.h',
- 'renderer/fileapi/webfilewriter_base.cc',
- 'renderer/fileapi/webfilewriter_base.h',
- ],
- # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
- 'msvs_disabled_warnings': [ 4267, ],
- },
- ],
-}
diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi
index db8a3a1..e8227f0 100644
--- a/webkit/support/webkit_support.gypi
+++ b/webkit/support/webkit_support.gypi
@@ -31,7 +31,6 @@
'<(DEPTH)/webkit/renderer/webkit_renderer.gyp:webkit_renderer',
'<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser',
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
- '<(DEPTH)/webkit/storage_renderer.gyp:webkit_storage_renderer',
'glue',
'glue_child',
'webkit_support_common',