Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Issue 159778: Make LocalStorage persistent (Closed)

Created:
11 years, 4 months ago by jorlow
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), brettw, jam, Ben Goodger (Google), michaeln
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22452

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 8

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 3

Patch Set 14 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -83 lines) Patch
M chrome/browser/in_process_webkit/browser_webkitclient_impl.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/in_process_webkit/browser_webkitclient_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h View 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/render_sandbox_host_linux.cc View 11 12 3 chunks +20 lines, -5 lines 0 comments Download
M chrome/renderer/renderer_webkitclient_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/renderer_webkitclient_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/worker/worker_webkitclient_impl.h View 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/worker/worker_webkitclient_impl.cc View 8 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/api/public/WebKitClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +43 lines, -20 lines 0 comments Download
M webkit/api/src/ChromiumBridge.cpp View 1 2 3 4 5 6 7 8 5 chunks +32 lines, -40 lines 0 comments Download
M webkit/api/src/WebKit.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -0 lines 0 comments Download
M webkit/glue/webkitclient_impl.h View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -1 line 0 comments Download
M webkit/glue/webkitclient_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +55 lines, -4 lines 0 comments Download
M webkit/tools/test_shell/test_shell_webkit_init.h View 8 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/test_worker/test_worker_main.cc View 8 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jorlow
I think this is ready for review.
11 years, 4 months ago (2009-08-03 22:02:45 UTC) #1
darin (slow to review)
http://codereview.chromium.org/159778/diff/1075/1084 File chrome/browser/in_process_webkit/browser_webkitclient_impl.cc (right): http://codereview.chromium.org/159778/diff/1075/1084#newcode70 Line 70: WebKit::WebString BrowserWebKitClientImpl::pathByAppendingComponent( I think this method should just ...
11 years, 4 months ago (2009-08-04 18:16:24 UTC) #2
jorlow
I'm pretty happy with things now. Take another look? http://codereview.chromium.org/159778/diff/1075/1084 File chrome/browser/in_process_webkit/browser_webkitclient_impl.cc (right): http://codereview.chromium.org/159778/diff/1075/1084#newcode70 Line ...
11 years, 4 months ago (2009-08-04 22:31:18 UTC) #3
darin (slow to review)
11 years, 4 months ago (2009-08-04 23:21:30 UTC) #4
LGTM

http://codereview.chromium.org/159778/diff/223/1175
File webkit/api/public/WebKitClient.h (right):

http://codereview.chromium.org/159778/diff/223/1175#newcode34
Line 34: #include <ctime>
nit: we usually just include time.h

http://codereview.chromium.org/159778/diff/223/1175#newcode86
Line 86: // Most of these have NOT_REACHED() asserts unless running in the
browser process.
nit: this comment is a bit out of place... it refers to an implementation that
does not exist at the WebKit API level.  also, the concept of a separate browser
process may not make much sense to other embedders of WebKit.

http://codereview.chromium.org/159778/diff/223/1175#newcode180
Line 180: // Returns whether or not we should act as though the sandbox is
this is a great comment, but i'm a bit torn since it refers to a lot of chrome
specific things.  can you generalize it a bit more?  (i'm torn b/c this is a
great comment.)

Powered by Google App Engine
This is Rietveld 408576698