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

Issue 7470008: Improve IndexedDB's quota support (Closed)

Created:
9 years, 5 months ago by dgrogan
Modified:
9 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, darin-cc_chromium.org, Paweł Hajdan Jr., hans, gregsimon
Visibility:
Public.

Description

Improve IndexedDB's quota support * Check available quota before storing anything * Inform quota manager of storage updates * Evict an origin when quota manager requests BUG=83652 TEST=llvm/Debug/unit_tests --gtest_filter=IndexedDBQuotaClientTest.* && llvm/Debug/browser_tests --gtest_filter=IndexedDBBrowser* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95691

Patch Set 1 #

Patch Set 2 : style problems #

Total comments: 27

Patch Set 3 : michael's new approach #

Patch Set 4 : don't allow creation of indices or object stores if over quota #

Patch Set 5 : add TODO about opening database when over quota #

Total comments: 53

Patch Set 6 : improve names and comments, better map cleanup #

Total comments: 12

Patch Set 7 : fixed easy comments #

Total comments: 17

Patch Set 8 : merged delete methods; simplify GetUsageCallback #

Total comments: 16

Patch Set 9 : finally responded to everything #

Total comments: 2

Patch Set 10 : remove unused method declaration #

Total comments: 10

Patch Set 11 : respond to comments, add clean up when renderer process goes away #

Total comments: 2

Patch Set 12 : remove NOTREACHED #

Unified diffs Side-by-side diffs Delta from patch set Stats (+342 lines, -45 lines) Patch
M chrome/browser/extensions/extension_data_deleter.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/in_process_webkit/indexed_db_callbacks.h View 1 2 2 chunks +19 lines, -3 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_callbacks.cc View 1 2 1 chunk +8 lines, -5 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_context.h View 1 2 3 4 5 6 7 8 4 chunks +26 lines, -4 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_context.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +158 lines, -12 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.h View 1 6 7 8 9 5 chunks +10 lines, -3 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 13 chunks +48 lines, -9 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_quota_client.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_quota_client.cc View 1 2 3 4 5 6 7 8 3 chunks +36 lines, -7 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +33 lines, -1 line 0 comments Download
M content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc View 1 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
dgrogan
Let me know if you want me to split this up. I was hoping to ...
9 years, 5 months ago (2011-07-26 01:57:07 UTC) #1
dgrogan
On 2011/07/26 01:57:07, dgrogan wrote: > Let me know if you want me to split ...
9 years, 5 months ago (2011-07-26 01:57:44 UTC) #2
dgrogan
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc File content/browser/in_process_webkit/indexed_db_quota_client.cc (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc#newcode227 content/browser/in_process_webkit/indexed_db_quota_client.cc:227: // safely delete them here. Kinuko, can you confirm ...
9 years, 5 months ago (2011-07-26 02:02:16 UTC) #3
kinuko
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc File content/browser/in_process_webkit/indexed_db_quota_client.cc (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc#newcode227 content/browser/in_process_webkit/indexed_db_quota_client.cc:227: // safely delete them here. On 2011/07/26 02:02:16, dgrogan ...
9 years, 5 months ago (2011-07-26 06:35:28 UTC) #4
dgrogan
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc File content/browser/in_process_webkit/indexed_db_quota_client.cc (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc#newcode227 content/browser/in_process_webkit/indexed_db_quota_client.cc:227: // safely delete them here. On 2011/07/26 06:35:28, kinuko ...
9 years, 5 months ago (2011-07-26 17:46:15 UTC) #5
michaeln
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_callbacks.h File content/browser/in_process_webkit/indexed_db_callbacks.h (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_callbacks.h#newcode84 content/browser/in_process_webkit/indexed_db_callbacks.h:84: GURL origin_url() const { return origin_url_; } can this ...
9 years, 5 months ago (2011-07-27 01:31:35 UTC) #6
kinuko
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc File content/browser/in_process_webkit/indexed_db_quota_client.cc (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_quota_client.cc#newcode227 content/browser/in_process_webkit/indexed_db_quota_client.cc:227: // safely delete them here. On 2011/07/27 01:31:35, michaeln ...
9 years, 5 months ago (2011-07-27 10:09:20 UTC) #7
dgrogan
Just big-picture stuff. http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_context.cc File content/browser/in_process_webkit/indexed_db_context.cc (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_context.cc#newcode105 content/browser/in_process_webkit/indexed_db_context.cc:105: // TODO(pastarmovj): Close all database connections ...
9 years, 5 months ago (2011-07-27 22:56:01 UTC) #8
dgrogan
http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_callbacks.h File content/browser/in_process_webkit/indexed_db_callbacks.h (right): http://codereview.chromium.org/7470008/diff/2001/content/browser/in_process_webkit/indexed_db_callbacks.h#newcode84 content/browser/in_process_webkit/indexed_db_callbacks.h:84: GURL origin_url() const { return origin_url_; } On 2011/07/27 ...
9 years, 4 months ago (2011-07-29 18:14:04 UTC) #9
dgrogan
9 years, 4 months ago (2011-08-03 00:07:44 UTC) #10
dgrogan
http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_callbacks.cc File content/browser/in_process_webkit/indexed_db_callbacks.cc (left): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_callbacks.cc#oldcode32 content/browser/in_process_webkit/indexed_db_callbacks.cc:32: dispatcher_host()->Context()->quota_manager_proxy()->NotifyStorageAccessed( This stuff was moved to IndexedDBContext, in a ...
9 years, 4 months ago (2011-08-03 01:41:29 UTC) #11
dgrogan
Michael, Kinuko, please take another look.
9 years, 4 months ago (2011-08-03 01:44:01 UTC) #12
michaeln
thnx for revamping this! http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_context.cc File content/browser/in_process_webkit/indexed_db_context.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_context.cc#newcode155 content/browser/in_process_webkit/indexed_db_context.cc:155: int64 disk_usage = ReadUsageFromDisk(origin_url); On ...
9 years, 4 months ago (2011-08-03 03:40:40 UTC) #13
kinuko
Have added some minor comments; for quota handling as michael commented you'll want to keep ...
9 years, 4 months ago (2011-08-03 09:12:18 UTC) #14
dgrogan
I didn't address everything yet. The stuff remaining is stuff that I'm not sure about ...
9 years, 4 months ago (2011-08-03 21:45:47 UTC) #15
michaeln
http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc File content/browser/in_process_webkit/indexed_db_dispatcher_host.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc#newcode1067 content/browser/in_process_webkit/indexed_db_dispatcher_host.cc:1067: idb_transaction->abort(); > I don't think so. This was bothering ...
9 years, 4 months ago (2011-08-04 00:23:27 UTC) #16
dgrogan
http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc File content/browser/in_process_webkit/indexed_db_dispatcher_host.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc#newcode214 content/browser/in_process_webkit/indexed_db_dispatcher_host.cc:214: uint64 quota = kDefaultQuota; On 2011/08/03 03:40:40, michaeln wrote: ...
9 years, 4 months ago (2011-08-04 19:47:50 UTC) #17
michaeln
http://codereview.chromium.org/7470008/diff/31001/content/browser/in_process_webkit/indexed_db_context.cc File content/browser/in_process_webkit/indexed_db_context.cc (right): http://codereview.chromium.org/7470008/diff/31001/content/browser/in_process_webkit/indexed_db_context.cc#newcode108 content/browser/in_process_webkit/indexed_db_context.cc:108: void IndexedDBContext::DeleteIndexedDBForOrigin(const GURL& origin_url) { Thnx for consolidating the ...
9 years, 4 months ago (2011-08-04 22:11:55 UTC) #18
dgrogan
http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_context.cc File content/browser/in_process_webkit/indexed_db_context.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_context.cc#newcode155 content/browser/in_process_webkit/indexed_db_context.cc:155: int64 disk_usage = ReadUsageFromDisk(origin_url); On 2011/08/03 03:40:40, michaeln wrote: ...
9 years, 4 months ago (2011-08-04 23:44:55 UTC) #19
michaeln
sooo clooose... can you run some try jobs? http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc File content/browser/in_process_webkit/indexed_db_dispatcher_host.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc#newcode467 content/browser/in_process_webkit/indexed_db_dispatcher_host.cc:467: parent_->Context()->ConnectionClosed(origin_url); ...
9 years, 4 months ago (2011-08-05 01:21:47 UTC) #20
dgrogan
http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc File content/browser/in_process_webkit/indexed_db_dispatcher_host.cc (right): http://codereview.chromium.org/7470008/diff/11011/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc#newcode467 content/browser/in_process_webkit/indexed_db_dispatcher_host.cc:467: parent_->Context()->ConnectionClosed(origin_url); On 2011/08/05 01:21:47, michaeln wrote: > Any reason ...
9 years, 4 months ago (2011-08-05 03:06:58 UTC) #21
michaeln
lgtm > Moved. Though I'm not sure that OnDestroyed is more robust. I have no ...
9 years, 4 months ago (2011-08-05 17:15:36 UTC) #22
dgrogan
On 2011/08/05 17:15:36, michaeln wrote: > lgtm > > > Moved. Though I'm not sure ...
9 years, 4 months ago (2011-08-05 18:00:07 UTC) #23
dgrogan
http://codereview.chromium.org/7470008/diff/36001/content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc File content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc (right): http://codereview.chromium.org/7470008/diff/36001/content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc#newcode32 content/browser/in_process_webkit/indexed_db_transaction_callbacks.cc:32: NOTREACHED(); On 2011/08/05 17:15:37, michaeln wrote: > is this ...
9 years, 4 months ago (2011-08-05 18:02:32 UTC) #24
commit-bot: I haz the power
9 years, 4 months ago (2011-08-05 23:53:18 UTC) #25
Change committed as 95691

Powered by Google App Engine
This is Rietveld 408576698