diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 01:15:54 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 01:15:54 +0000 |
commit | 1f8b34120905d0cb89f8a35c2a9e38ee1747c878 (patch) | |
tree | 63687e8e964bacf3491ad111d4aad28fc17dad25 /webkit/glue/webkitclient_impl.h | |
parent | 97880fa256d45accb61d1c9887bb7e28724286cd (diff) | |
download | chromium_src-1f8b34120905d0cb89f8a35c2a9e38ee1747c878.zip chromium_src-1f8b34120905d0cb89f8a35c2a9e38ee1747c878.tar.gz chromium_src-1f8b34120905d0cb89f8a35c2a9e38ee1747c878.tar.bz2 |
This CL is doing a bunch of Misc work to make LocalStorage data persist.
First of all, this allows WebKit clients to specify whether or not the VFS should be used. In the browser process, we never want it to be.
Next, this allows WebKit clients to specify the behavior of WebKit's FileSystem code. By default, they should all be NOT_REACHED(). The browser process implements the two of these I need for LocalStorage, but it'll be really easy for the rest to be implemented as needed.
Next, this adds a function that storage routines can call to ensure that lazily initialized stuff that must be initialized on the main WebKit thread is initialized. Right now, this is just used to initialize the UTF8 conversion tables, but I'm sure there'll be more overt time.
Lastly, this uses the profile directory stored by webkit_context_ to derive the path LocalStorage should use.
This CL also cleans up a few minor style issues as it goes.
TEST=none
BUG=4360
Review URL: http://codereview.chromium.org/159778
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkitclient_impl.h')
-rw-r--r-- | webkit/glue/webkitclient_impl.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h index e3035ae..8b6574e 100644 --- a/webkit/glue/webkitclient_impl.h +++ b/webkit/glue/webkitclient_impl.h @@ -41,11 +41,22 @@ class WebKitClientImpl : public WebKit::WebKitClient { virtual void suddenTerminationChanged(bool enabled) { } virtual base::PlatformFile databaseOpenFile( - const WebKit::WebString& file_name, int desired_flags); + const WebKit::WebString& file_name, int desired_flags); virtual bool databaseDeleteFile(const WebKit::WebString& file_name); virtual long databaseGetFileAttributes(const WebKit::WebString& file_name); virtual long long databaseGetFileSize(const WebKit::WebString& file_name); + virtual bool fileExists(const WebKit::WebString& path); + virtual bool deleteFile(const WebKit::WebString& path); + virtual bool deleteEmptyDirectory(const WebKit::WebString& path); + virtual bool getFileSize(const WebKit::WebString& path, long long& result); + virtual bool getFileModificationTime(const WebKit::WebString& path, + time_t& result); + virtual WebKit::WebString directoryName(const WebKit::WebString& path); + virtual WebKit::WebString pathByAppendingComponent( + const WebKit::WebString& path, const WebKit::WebString& component); + virtual bool makeAllDirectories(const WebKit::WebString& path); + private: void DoTimeout() { if (shared_timer_func_) |