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

Issue 9159020: Create a class to represent a DOM Storage Database. (Closed)

Created:
8 years, 11 months ago by benm (inactive)
Modified:
8 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, dpranke-watch+content_chromium.org, marja
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Create a class to represent a Dom Storage Database. Add a class that can read/write a local storage database in the same format as WebCore's StorageArea. Also add a method to sql::Statement to query the declared type of a column and a method to return a string16 from a Blob. BUG=106763 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121442

Patch Set 1 #

Total comments: 13

Patch Set 2 : Add DomStorageDatabase class and unit tests. #

Patch Set 3 : Add DOM Storage database class. #

Total comments: 12

Patch Set 4 : DomStorageDatabase for backing local storage to disk. #

Total comments: 20

Patch Set 5 : Update API to a single function for committing changes #

Patch Set 6 : Remove some unused includes. #

Total comments: 34

Patch Set 7 : Address comments and add a new test for failed DB upgrade. #

Patch Set 8 : Add bug # to description, address some try bot complaints #

Patch Set 9 : Disable test that uses the webcore localstorage file pending the test data getting checked in. #

Total comments: 37

Patch Set 10 : Address comments and add handling of a corrupt database file in LazyOpen #

Total comments: 23

Patch Set 11 : Address review comments, streamline tests and allow them to operate on in-memory databases. #

Total comments: 1

Patch Set 12 : Addressed a couple of things I noticed :) #

Total comments: 1

Patch Set 13 : Rebase gypi files. #

Patch Set 14 : Tidy up. #

Total comments: 15

Patch Set 15 : Restructure LazyOpen and add DetectSchemaVersion. #

Patch Set 16 : Prune some comments. #

Patch Set 17 : Disable the WebCore DB test to keep try bots happy while the binary test data is landed #

Total comments: 16

Patch Set 18 : Address review comments #

Patch Set 19 : Add missing binary file from r121442 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+-1 lines, --1 lines) Patch
A webkit/data/dom_storage/webcore_test_database.localstorage View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
michaeln
http://codereview.chromium.org/9159020/diff/1/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/9159020/diff/1/chrome/chrome_tests.gypi#newcode2102 chrome/chrome_tests.gypi:2102: '../webkit/dom_storage/local_storage_database_unittest.cc', we should put tests in test_shell_tests, see webkit/tools/test_shell/test_shell.gypi ...
8 years, 11 months ago (2012-01-24 00:18:15 UTC) #1
benm (inactive)
Thanks for taking a look Michael! I've got an update in progress, will upload soon. ...
8 years, 11 months ago (2012-01-24 10:47:00 UTC) #2
michaeln
http://codereview.chromium.org/9159020/diff/1/webkit/dom_storage/local_storage_database.h File webkit/dom_storage/local_storage_database.h (right): http://codereview.chromium.org/9159020/diff/1/webkit/dom_storage/local_storage_database.h#newcode19 webkit/dom_storage/local_storage_database.h:19: class LocalStorageDatabase { class DOMStorageDatabase... for consistency with other ...
8 years, 11 months ago (2012-01-24 17:43:40 UTC) #3
benm (inactive)
http://codereview.chromium.org/9159020/diff/1/webkit/dom_storage/local_storage_database.h File webkit/dom_storage/local_storage_database.h (right): http://codereview.chromium.org/9159020/diff/1/webkit/dom_storage/local_storage_database.h#newcode19 webkit/dom_storage/local_storage_database.h:19: class LocalStorageDatabase { sgtm
8 years, 11 months ago (2012-01-24 17:51:07 UTC) #4
benm (inactive)
New snapshot based on our discussions the other day.
8 years, 11 months ago (2012-01-25 19:33:27 UTC) #5
michaeln
http://codereview.chromium.org/9159020/diff/10001/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/10001/webkit/dom_storage/dom_storage_database.cc#newcode113 webkit/dom_storage/dom_storage_database.cc:113: string16 value(reinterpret_cast<const char16*>(stmt.ColumnBlob(1))); Can these values have embedded NULLs ...
8 years, 10 months ago (2012-01-31 03:11:16 UTC) #6
benm (inactive)
http://codereview.chromium.org/9159020/diff/10001/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/10001/webkit/dom_storage/dom_storage_database.cc#newcode113 webkit/dom_storage/dom_storage_database.cc:113: string16 value(reinterpret_cast<const char16*>(stmt.ColumnBlob(1))); I'm writing out using c_str(), so ...
8 years, 10 months ago (2012-01-31 15:10:52 UTC) #7
michaeln
http://codereview.chromium.org/9159020/diff/15002/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/15002/webkit/dom_storage/dom_storage_database.cc#newcode38 webkit/dom_storage/dom_storage_database.cc:38: Close(); Since sql::Connection dtor will close automatically for you, ...
8 years, 10 months ago (2012-01-31 22:45:32 UTC) #8
benm (inactive)
thanks, new patch soon! http://codereview.chromium.org/9159020/diff/15002/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/15002/webkit/dom_storage/dom_storage_database.cc#newcode38 webkit/dom_storage/dom_storage_database.cc:38: Close(); Close is private and ...
8 years, 10 months ago (2012-02-01 15:42:08 UTC) #9
michaeln
looking pretty good, can u run some try jobs and update the CL to include ...
8 years, 10 months ago (2012-02-01 21:03:11 UTC) #10
benm (inactive)
http://codereview.chromium.org/9159020/diff/18002/sql/statement.cc File sql/statement.cc (right): http://codereview.chromium.org/9159020/diff/18002/sql/statement.cc#newcode273 sql/statement.cc:273: bool Statement::ColumnBlobAsString16(int col, string16* val) const { On 2012/02/01 ...
8 years, 10 months ago (2012-02-02 12:14:48 UTC) #11
benm (inactive)
Hey Michael, I've addressed your last set of comments. The try servers seem to be ...
8 years, 10 months ago (2012-02-02 15:17:02 UTC) #12
benm (inactive)
It seems that the try-bot isn't creating the file in the first place (consensus seems ...
8 years, 10 months ago (2012-02-02 15:42:51 UTC) #13
benm (inactive)
mac and linux try bots are green and windows is red but it appears not ...
8 years, 10 months ago (2012-02-02 19:07:11 UTC) #14
michaeln
The DomStorageDatabase class is looking pretty good, please take a look at my comments about ...
8 years, 10 months ago (2012-02-03 04:45:15 UTC) #15
michaeln
Seems like the v1 to v2 upgrade code path is adding a lot of complexity, ...
8 years, 10 months ago (2012-02-03 09:21:30 UTC) #16
benm (inactive)
Thanks again Michael.. new patch coming soon http://codereview.chromium.org/9159020/diff/18002/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/18002/webkit/dom_storage/dom_storage_database.cc#newcode106 webkit/dom_storage/dom_storage_database.cc:106: LOG(WARNING) << ...
8 years, 10 months ago (2012-02-03 11:46:40 UTC) #17
benm (inactive)
http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc File webkit/dom_storage/dom_storage_database_unittest.cc (right): http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc#newcode35 webkit/dom_storage/dom_storage_database_unittest.cc:35: // Create a table with the value type as ...
8 years, 10 months ago (2012-02-03 14:21:35 UTC) #18
michaeln
http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc File webkit/dom_storage/dom_storage_database_unittest.cc (right): http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc#newcode185 webkit/dom_storage/dom_storage_database_unittest.cc:185: TEST_F(DomStorageDatabaseTest, SimpleWrite) { On 2012/02/03 11:46:40, benm wrote: > ...
8 years, 10 months ago (2012-02-04 00:21:34 UTC) #19
benm (inactive)
http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc File webkit/dom_storage/dom_storage_database_unittest.cc (right): http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc#newcode185 webkit/dom_storage/dom_storage_database_unittest.cc:185: TEST_F(DomStorageDatabaseTest, SimpleWrite) { OK, done http://codereview.chromium.org/9159020/diff/24013/webkit/dom_storage/dom_storage_database_unittest.cc#newcode242 webkit/dom_storage/dom_storage_database_unittest.cc:242: TEST_F(DomStorageDatabaseTest, UpgradeFromV1ToV2NoData) ...
8 years, 10 months ago (2012-02-06 14:02:36 UTC) #20
benm (inactive)
http://codereview.chromium.org/9159020/diff/23014/webkit/dom_storage/dom_storage_database_unittest.cc File webkit/dom_storage/dom_storage_database_unittest.cc (right): http://codereview.chromium.org/9159020/diff/23014/webkit/dom_storage/dom_storage_database_unittest.cc#newcode18 webkit/dom_storage/dom_storage_database_unittest.cc:18: // run much faster if they were operating on ...
8 years, 10 months ago (2012-02-06 15:41:33 UTC) #21
benm (inactive)
New snapshot with all these changes on the way. http://codereview.chromium.org/9159020/diff/23014/webkit/dom_storage/dom_storage_database_unittest.cc File webkit/dom_storage/dom_storage_database_unittest.cc (right): http://codereview.chromium.org/9159020/diff/23014/webkit/dom_storage/dom_storage_database_unittest.cc#newcode18 webkit/dom_storage/dom_storage_database_unittest.cc:18: ...
8 years, 10 months ago (2012-02-06 17:03:21 UTC) #22
benm (inactive)
http://codereview.chromium.org/9159020/diff/29001/sql/diagnostic_error_delegate.h File sql/diagnostic_error_delegate.h (right): http://codereview.chromium.org/9159020/diff/29001/sql/diagnostic_error_delegate.h#newcode34 sql/diagnostic_error_delegate.h:34: */ RecordErrorInHistogram(error); d'oh, didn't mean to leave this in. ...
8 years, 10 months ago (2012-02-06 18:19:41 UTC) #23
benm (inactive)
Hi Michael, I think the latest version of the patch should address the latest round ...
8 years, 10 months ago (2012-02-07 19:01:01 UTC) #24
michaeln
>> if (!db_->Open()) { >> // oh no!!!! >> return database_exists ? DeleteAndRecreate() : false; ...
8 years, 10 months ago (2012-02-08 06:11:33 UTC) #25
michaeln
hi ben, i keep coming back to the lazy open logic (with auto upgrade) and ...
8 years, 10 months ago (2012-02-08 06:30:09 UTC) #26
benm (inactive)
On 2012/02/08 06:11:33, michaeln wrote: > I don't understand the comment about DCHECKS? > > ...
8 years, 10 months ago (2012-02-08 11:40:43 UTC) #27
benm (inactive)
http://codereview.chromium.org/9159020/diff/36002/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/36002/webkit/dom_storage/dom_storage_database.cc#newcode123 webkit/dom_storage/dom_storage_database.cc:123: LOG(ERROR) << "Unable to open DOM storage database in ...
8 years, 10 months ago (2012-02-08 14:59:40 UTC) #28
benm (inactive)
New snapshot uploaded and trybots are running. Please take a look! Thanks, Ben
8 years, 10 months ago (2012-02-08 18:26:18 UTC) #29
michaeln
getting real close, no real substantive comments but a few things to consider https://chromiumcodereview.appspot.com/9159020/diff/49012/webkit/dom_storage/dom_storage_database.cc File ...
8 years, 10 months ago (2012-02-08 22:12:07 UTC) #30
benm (inactive)
Thanks Michael... new snapshot on the way http://codereview.chromium.org/9159020/diff/49012/webkit/dom_storage/dom_storage_database.cc File webkit/dom_storage/dom_storage_database.cc (right): http://codereview.chromium.org/9159020/diff/49012/webkit/dom_storage/dom_storage_database.cc#newcode145 webkit/dom_storage/dom_storage_database.cc:145: if (CreateTableV2()) ...
8 years, 10 months ago (2012-02-09 11:59:57 UTC) #31
benm (inactive)
Linux and Mac green, Windows red but apparently not due to my change. Please take ...
8 years, 10 months ago (2012-02-09 15:37:14 UTC) #32
michaeln
lgtm Not real clear what's best LazyOpen litmus test check (reading auto_vacuum vs quick_check vs ...
8 years, 10 months ago (2012-02-09 19:30:44 UTC) #33
benm (inactive)
Darin, Tony, can I get OWNERS approval for changing th gypi and adding the test ...
8 years, 10 months ago (2012-02-09 19:47:05 UTC) #34
tony
webkit/ LGTM
8 years, 10 months ago (2012-02-09 19:52:23 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benm@chromium.org/9159020/51001
8 years, 10 months ago (2012-02-10 12:16:56 UTC) #36
commit-bot: I haz the power
8 years, 10 months ago (2012-02-10 13:32:02 UTC) #37
Change committed as 121442

Powered by Google App Engine
This is Rietveld 408576698