diff options
author | victorw@chromium.org <victorw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-03 00:24:57 +0000 |
---|---|---|
committer | victorw@chromium.org <victorw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-03 00:24:57 +0000 |
commit | e0d8cbdb23b9a8446ffb1b8355652f2b167238f1 (patch) | |
tree | d7acb45db42060eed51b4ece5955ad3d042922ea /webkit/api | |
parent | a0181609ceca468ce66eca453dcce4283a7bdcec (diff) | |
download | chromium_src-e0d8cbdb23b9a8446ffb1b8355652f2b167238f1.zip chromium_src-e0d8cbdb23b9a8446ffb1b8355652f2b167238f1.tar.gz chromium_src-e0d8cbdb23b9a8446ffb1b8355652f2b167238f1.tar.bz2 |
Add getFileSize support to chromium
The current implementation only allows getting file size
if the child process has been granted permission to upload file.
May need to update the policy checking code if getFileSize
is needed in other cases.
Here is the webkit implementation to support this:
https://bugs.webkit.org/show_bug.cgi?id=26521
TEST=none
BUG=9102
Review URL: http://codereview.chromium.org/131082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api')
-rw-r--r-- | webkit/api/public/WebKitClient.h | 4 | ||||
-rw-r--r-- | webkit/api/src/ChromiumBridge.cpp | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/webkit/api/public/WebKitClient.h b/webkit/api/public/WebKitClient.h index 4ebbb25..4de58c3 100644 --- a/webkit/api/public/WebKitClient.h +++ b/webkit/api/public/WebKitClient.h @@ -82,6 +82,10 @@ namespace WebKit { // A suggestion to prefetch IP information for the given hostname. virtual void prefetchHostName(const WebString&) = 0; + // File ---------------------------------------------------------------- + + virtual bool getFileSize(const WebString& path, long long& result) = 0; + // Returns a new WebURLLoader instance. virtual WebURLLoader* createURLLoader() = 0; diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index 3fdef0a..4d05a2e 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -148,6 +148,13 @@ void ChromiumBridge::prefetchDNS(const String& hostname) webKitClient()->prefetchHostName(hostname); } +// File ------------------------------------------------------------------------ + +bool ChromiumBridge::getFileSize(const String& path, long long& result) +{ + return webKitClient()->getFileSize(path, result); +} + // Font ----------------------------------------------------------------------- #if PLATFORM(WIN_OS) |