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

Issue 9389009: Hook up DomStorageArea with a DomStorageDatabase. (Closed)

Created:
8 years, 10 months ago by benm (inactive)
Modified:
8 years, 9 months ago
Reviewers:
michaeln
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Hook up DomStorageArea with a DomStorageDatabase. Uses DomStorageTaskRunner to asynchronously write to the database. BUG=106763 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=123744

Patch Set 1 #

Patch Set 2 : Try and make the Windows try bot happy. #

Total comments: 6

Patch Set 3 : Use task_runner_ to post a task to write to the db. #

Patch Set 4 : Rename CommitChanges* methods. #

Total comments: 7

Patch Set 5 : Batch changes and commit them after 1s. #

Patch Set 6 : Rebase after quota changes landed. #

Total comments: 8

Patch Set 7 : Address review comments and delete databases on destruction if they are empty. #

Total comments: 16

Patch Set 8 : Create and use a MockDomStorageTaskRunner in unit test #

Total comments: 8

Patch Set 9 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -35 lines) Patch
M webkit/dom_storage/dom_storage_area.h View 1 2 3 4 3 chunks +22 lines, -6 lines 0 comments Download
M webkit/dom_storage/dom_storage_area.cc View 1 2 3 4 5 6 2 chunks +113 lines, -11 lines 0 comments Download
M webkit/dom_storage/dom_storage_area_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +105 lines, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_database.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_namespace.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M webkit/dom_storage/dom_storage_namespace.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_task_runner.h View 1 2 3 4 5 6 7 3 chunks +18 lines, -4 lines 0 comments Download
M webkit/dom_storage/dom_storage_task_runner.cc View 1 2 3 4 5 6 7 8 2 chunks +30 lines, -13 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
benm (inactive)
Hi Michael, Here's first pass at hooking DomStorageDatabase into DomStorageArea. Right now everything is synchronous ...
8 years, 10 months ago (2012-02-13 19:40:27 UTC) #1
michaeln
You say you have a start at a lazy async version that utilizes taskRunner, that ...
8 years, 10 months ago (2012-02-14 06:39:26 UTC) #2
benm (inactive)
http://codereview.chromium.org/9389009/diff/5001/webkit/dom_storage/dom_storage_area.h File webkit/dom_storage/dom_storage_area.h (right): http://codereview.chromium.org/9389009/diff/5001/webkit/dom_storage/dom_storage_area.h#newcode14 webkit/dom_storage/dom_storage_area.h:14: #include "webkit/dom_storage/dom_storage_database.h" I think it needs to be #included ...
8 years, 10 months ago (2012-02-14 11:12:07 UTC) #3
benm (inactive)
new snapshot, please take a look! Cheers, Ben
8 years, 10 months ago (2012-02-14 16:29:00 UTC) #4
michaeln
https://chromiumcodereview.appspot.com/9389009/diff/7002/webkit/dom_storage/dom_storage_area.cc File webkit/dom_storage/dom_storage_area.cc (right): https://chromiumcodereview.appspot.com/9389009/diff/7002/webkit/dom_storage/dom_storage_area.cc#newcode134 webkit/dom_storage/dom_storage_area.cc:134: if (!clear_all_next_commit_ && changed_values_.empty()) given the usage of this ...
8 years, 10 months ago (2012-02-15 04:10:53 UTC) #5
benm (inactive)
http://codereview.chromium.org/9389009/diff/7002/webkit/dom_storage/dom_storage_area.cc File webkit/dom_storage/dom_storage_area.cc (right): http://codereview.chromium.org/9389009/diff/7002/webkit/dom_storage/dom_storage_area.cc#newcode134 webkit/dom_storage/dom_storage_area.cc:134: if (!clear_all_next_commit_ && changed_values_.empty()) sgtm. http://codereview.chromium.org/9389009/diff/7002/webkit/dom_storage/dom_storage_area.cc#newcode138 webkit/dom_storage/dom_storage_area.cc:138: if (!task_runner_->PostTask( ...
8 years, 10 months ago (2012-02-15 17:38:16 UTC) #6
benm (inactive)
New snapshot that should batch changes up and commit them 1s after the first change ...
8 years, 10 months ago (2012-02-15 20:45:46 UTC) #7
benm (inactive)
Rebased, please take a look! Cheers, ben
8 years, 10 months ago (2012-02-22 19:57:55 UTC) #8
michaeln
I think there's another behavior our impl should have. Deleting empty database files on exit. ...
8 years, 10 months ago (2012-02-23 05:15:29 UTC) #9
benm (inactive)
Thanks for looking! New snapshot on the way. http://codereview.chromium.org/9389009/diff/25001/webkit/dom_storage/dom_storage_area.cc File webkit/dom_storage/dom_storage_area.cc (right): http://codereview.chromium.org/9389009/diff/25001/webkit/dom_storage/dom_storage_area.cc#newcode48 webkit/dom_storage/dom_storage_area.cc:48: DCHECK(changed_values_.empty()); ...
8 years, 10 months ago (2012-02-23 12:27:40 UTC) #10
benm (inactive)
New snapshot ready, ptal!
8 years, 10 months ago (2012-02-23 19:52:38 UTC) #11
michaeln
http://codereview.chromium.org/9389009/diff/32002/webkit/dom_storage/dom_storage_area_unittest.cc File webkit/dom_storage/dom_storage_area_unittest.cc (right): http://codereview.chromium.org/9389009/diff/32002/webkit/dom_storage/dom_storage_area_unittest.cc#newcode20 webkit/dom_storage/dom_storage_area_unittest.cc:20: void QuitMessageLoop() { should either make this static or ...
8 years, 10 months ago (2012-02-23 20:48:48 UTC) #12
michaeln
also... http://codereview.chromium.org/9389009/diff/32002/webkit/dom_storage/dom_storage_task_runner.cc File webkit/dom_storage/dom_storage_task_runner.cc (right): http://codereview.chromium.org/9389009/diff/32002/webkit/dom_storage/dom_storage_task_runner.cc#newcode68 webkit/dom_storage/dom_storage_task_runner.cc:68: base::Bind(IgnoreResult(&DomStorageWorkerPoolTaskRunner::PostTask), this, maybe you don't need to fully ...
8 years, 10 months ago (2012-02-23 20:52:38 UTC) #13
benm (inactive)
thanks, new snapshot uploaded. I've moved the code to delete empty databases into http://codereview.chromium.org/9467003/ as ...
8 years, 10 months ago (2012-02-24 12:42:01 UTC) #14
michaeln
lgtm http://codereview.chromium.org/9389009/diff/40001/webkit/dom_storage/dom_storage_area_unittest.cc File webkit/dom_storage/dom_storage_area_unittest.cc (right): http://codereview.chromium.org/9389009/diff/40001/webkit/dom_storage/dom_storage_area_unittest.cc#newcode113 webkit/dom_storage/dom_storage_area_unittest.cc:113: EXPECT_TRUE(area->backing_.get()); maybe EXPECT_FALSE(area->backing_->IsOpen()) here http://codereview.chromium.org/9389009/diff/40001/webkit/dom_storage/dom_storage_area_unittest.cc#newcode114 webkit/dom_storage/dom_storage_area_unittest.cc:114: EXPECT_FALSE(area->initial_import_done_); Consider ...
8 years, 10 months ago (2012-02-24 19:29:51 UTC) #15
benm (inactive)
thanks! http://codereview.chromium.org/9389009/diff/40001/webkit/dom_storage/dom_storage_area_unittest.cc File webkit/dom_storage/dom_storage_area_unittest.cc (right): http://codereview.chromium.org/9389009/diff/40001/webkit/dom_storage/dom_storage_area_unittest.cc#newcode113 webkit/dom_storage/dom_storage_area_unittest.cc:113: EXPECT_TRUE(area->backing_.get()); On 2012/02/24 19:29:52, michaeln wrote: > maybe ...
8 years, 10 months ago (2012-02-27 10:39:26 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benm@chromium.org/9389009/42004
8 years, 10 months ago (2012-02-27 14:37:49 UTC) #17
commit-bot: I haz the power
8 years, 9 months ago (2012-02-27 16:26:05 UTC) #18
Change committed as 123744

Powered by Google App Engine
This is Rietveld 408576698