diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-26 17:06:27 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-26 17:06:27 +0000 |
commit | ca1d0ca7ee585eba6bf0bdc45a06809a47b0b6dc (patch) | |
tree | 75d463b3651d4770c8d776e67cde82efb6e72ecd /ppapi/thunk | |
parent | 8e7415e446a2379aecead2903cbc96a34e02fe98 (diff) | |
download | chromium_src-ca1d0ca7ee585eba6bf0bdc45a06809a47b0b6dc.zip chromium_src-ca1d0ca7ee585eba6bf0bdc45a06809a47b0b6dc.tar.gz chromium_src-ca1d0ca7ee585eba6bf0bdc45a06809a47b0b6dc.tar.bz2 |
Pepper: Remove Will* from PPB_FileIOTrusted.
Nobody uses these methods today. Additionally, WillWrite/WillSetLength are no
good for plugin-side writes. They require an extra IPC round-trip that has to
be made for every write call. I don't see any advantage of this over a plugin
just calling Write()/SetLength() directly and getting a NOQUOTA error back.
I'm removing these methods to clean up code a bit and make the FileIO move from
the renderer to the browser smaller.
R=bbudge@chromium.org, dmichael@chromium.org, kinuko@chromium.org
TBR=jschuh
BUG=246396
Review URL: https://codereview.chromium.org/24615002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/ppb_file_io_api.h | 5 | ||||
-rw-r--r-- | ppapi/thunk/ppb_file_io_trusted_thunk.cc | 25 |
2 files changed, 1 insertions, 29 deletions
diff --git a/ppapi/thunk/ppb_file_io_api.h b/ppapi/thunk/ppb_file_io_api.h index ec7f16d..9c29f1f 100644 --- a/ppapi/thunk/ppb_file_io_api.h +++ b/ppapi/thunk/ppb_file_io_api.h @@ -47,11 +47,6 @@ class PPAPI_THUNK_EXPORT PPB_FileIO_API { // Trusted API. virtual int32_t GetOSFileDescriptor() = 0; - virtual int32_t WillWrite(int64_t offset, - int32_t bytes_to_write, - scoped_refptr<TrackedCallback> callback) = 0; - virtual int32_t WillSetLength(int64_t length, - scoped_refptr<TrackedCallback> callback) = 0; // Private API. virtual int32_t RequestOSFileHandle( diff --git a/ppapi/thunk/ppb_file_io_trusted_thunk.cc b/ppapi/thunk/ppb_file_io_trusted_thunk.cc index 3336026..8d31e28 100644 --- a/ppapi/thunk/ppb_file_io_trusted_thunk.cc +++ b/ppapi/thunk/ppb_file_io_trusted_thunk.cc @@ -25,31 +25,8 @@ int32_t GetOSFileDescriptor(PP_Resource file_io) { return enter.object()->GetOSFileDescriptor(); } -int32_t WillWrite(PP_Resource file_io, - int64_t offset, - int32_t bytes_to_write, - PP_CompletionCallback callback) { - EnterFileIO enter(file_io, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->WillWrite(offset, bytes_to_write, - enter.callback())); -} - -int32_t WillSetLength(PP_Resource file_io, - int64_t length, - PP_CompletionCallback callback) { - EnterFileIO enter(file_io, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->WillSetLength(length, - enter.callback())); -} - const PPB_FileIOTrusted g_ppb_file_io_trusted_thunk = { - &GetOSFileDescriptor, - &WillWrite, - &WillSetLength + &GetOSFileDescriptor }; } // namespace |