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

Issue 192003: Refactor DOM Storage to pave the way for events and locking. (Closed)

Created:
11 years, 3 months ago by jorlow
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, brettw, jam, Ben Goodger (Google)
Visibility:
Public.

Description

Refactor DOM storage to be more object oriented. All the DOMStorageDispatcher hosts (which are each owned by one ResourceMessageFilter) for the same profile share a WebKit context, and each one of those contexts owns a DOMStorageContext. The DOMStorageContext owns storage namespace objects which own storage area objects which wrap their WebKit counterparts. Not only is this cleaner code wise and more efficient (we're not duplicating WebStorageNamespaces and Areas for each DOMStorageDispatcherHost) but this is necessary for events and locking. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25609

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 61

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+527 lines, -150 lines) Patch
A chrome/browser/in_process_webkit/dom_storage_context.h View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
A chrome/browser/in_process_webkit/dom_storage_context.cc View 1 2 3 4 5 6 7 8 9 1 chunk +84 lines, -0 lines 0 comments Download
M chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -37 lines 0 comments Download
M chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 16 chunks +45 lines, -98 lines 0 comments Download
A chrome/browser/in_process_webkit/storage_area.h View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/in_process_webkit/storage_area.cc View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/in_process_webkit/storage_namespace.h View 1 2 3 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/in_process_webkit/storage_namespace.cc View 1 2 3 4 5 6 1 chunk +95 lines, -0 lines 0 comments Download
M chrome/browser/in_process_webkit/webkit_context.h View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/in_process_webkit/webkit_context.cc View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/in_process_webkit/webkit_thread.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/in_process_webkit/webkit_thread.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -11 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/glue/webkit_glue.h View 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/webkit_glue.cc View 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
jorlow
11 years, 3 months ago (2009-09-03 03:49:42 UTC) #1
michaeln
This looks close to me. I saw a couple of potentially material things, but mostly ...
11 years, 3 months ago (2009-09-03 20:52:02 UTC) #2
jorlow
Uploaded a new version. Darin, it'd be great if you could look at this soon. ...
11 years, 3 months ago (2009-09-04 02:35:27 UTC) #3
darin (slow to review)
Please update the CL description with details about what is changing. I think the comments ...
11 years, 3 months ago (2009-09-04 05:44:37 UTC) #4
darin (slow to review)
http://codereview.chromium.org/192003/diff/6001/7010 File chrome/browser/in_process_webkit/dom_storage_context.cc (right): http://codereview.chromium.org/192003/diff/6001/7010#newcode31 Line 31: FilePath dir_path = data_path.empty() ? FilePath() nit: like ...
11 years, 3 months ago (2009-09-04 06:06:41 UTC) #5
jorlow
Sure...but what about the rest of the patch? On Fri, Sep 4, 2009 at 2:44 ...
11 years, 3 months ago (2009-09-04 06:08:23 UTC) #6
michaeln
http://codereview.chromium.org/192003/diff/6001/7005 File chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h (right): http://codereview.chromium.org/192003/diff/6001/7005#newcode57 Line 57: DOMStorageContext* Context(); On 2009/09/04 02:35:27, Jeremy Orlow wrote: ...
11 years, 3 months ago (2009-09-04 06:56:07 UTC) #7
jorlow
New version uploaded. Thanks for the good comments! http://codereview.chromium.org/192003/diff/6001/7010 File chrome/browser/in_process_webkit/dom_storage_context.cc (right): http://codereview.chromium.org/192003/diff/6001/7010#newcode31 Line 31: ...
11 years, 3 months ago (2009-09-04 13:40:49 UTC) #8
jorlow
All issues have now been addressed. I believe this is ready to land. Please take ...
11 years, 3 months ago (2009-09-04 14:23:49 UTC) #9
michaeln
LGTM * About using GURL vs std::string16 for origin, I do think that would make ...
11 years, 3 months ago (2009-09-04 17:08:22 UTC) #10
jorlow
http://codereview.chromium.org/192003/diff/7015/6013 File chrome/browser/in_process_webkit/dom_storage_context.cc (right): http://codereview.chromium.org/192003/diff/7015/6013#newcode26 Line 26: while (storage_namespace_map_.begin() != storage_namespace_map_.end()) On 2009/09/04 17:08:22, michaeln ...
11 years, 3 months ago (2009-09-04 22:48:30 UTC) #11
darin (slow to review)
On 2009/09/04 17:08:22, michaeln wrote: > LGTM > > * About using GURL vs std::string16 ...
11 years, 3 months ago (2009-09-04 23:25:45 UTC) #12
darin (slow to review)
http://codereview.chromium.org/192003/diff/6001/7012 File chrome/browser/in_process_webkit/storage_namespace.cc (right): http://codereview.chromium.org/192003/diff/6001/7012#newcode25 Line 25: WebString path = webkit_glue::FilePathStringToWebString(dir_path.value()); On 2009/09/04 13:40:49, Jeremy ...
11 years, 3 months ago (2009-09-04 23:26:46 UTC) #13
jorlow
Darin, so if I make the one change Michael mentioned (the while loop) does it ...
11 years, 3 months ago (2009-09-07 16:08:33 UTC) #14
jorlow
Changes made and gclient sync'ed.
11 years, 3 months ago (2009-09-08 03:04:59 UTC) #15
jorlow
11 years, 3 months ago (2009-09-08 03:05:46 UTC) #16
Actually, I think I'm just going to submit since I got one LGTM and Darin didn't
have any additional comments.  If there are any changes I still need to make,
I'll do them ASAP.

Powered by Google App Engine
This is Rietveld 408576698