Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Issue 7835031: Allow webRequest API extension to clear the in-memory cache of WebKit. (Closed)

Created:
9 years, 3 months ago by battre
Modified:
9 years, 2 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, mihaip+watch_chromium.org
Visibility:
Public.

Description

Allow webRequest API extensions to clear the in-memory cache of WebKit. If the behavior of a webRequest API extension changes (i.e. different URLs are blocked) this effect was not visible instantly due to WebKit's in-memory cache. This CL introduces a means to clear the cache. BUG=94284 TEST=no Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=103289

Patch Set 1 #

Total comments: 1

Patch Set 2 : Implemented that cache clearing is postponed until a tab is reloaded #

Total comments: 7

Patch Set 3 : Addressed comments #

Patch Set 4 : Moved delayed cache clear out of webkit and content #

Patch Set 5 : cleanups #

Patch Set 6 : test non-nullity for browser tests #

Patch Set 7 : merged w/ ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -13 lines) Patch
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/extension_webrequest_api.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_webrequest_api.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/web_cache_manager.h View 1 2 2 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/web_cache_manager.cc View 1 2 2 chunks +13 lines, -4 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/experimental.webRequest.html View 1 2 3 4 5 6 2 chunks +133 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/samples.json View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/chrome_render_process_observer.h View 1 2 3 4 3 chunks +9 lines, -1 line 0 comments Download
M chrome/renderer/chrome_render_process_observer.cc View 1 2 3 4 5 6 3 chunks +15 lines, -3 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.h View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
battre
This is a minimal CL that fixes 94284 (I was able to reproduce the issue ...
9 years, 3 months ago (2011-09-07 15:24:04 UTC) #1
willchan no longer on Chromium
I defer to Matt and Adam here. FWIW, I advise you update the changelist description ...
9 years, 3 months ago (2011-09-07 17:43:05 UTC) #2
abarth-chromium
I worry about the performance impact as well. Generally we have worked hard to avoid ...
9 years, 3 months ago (2011-09-07 17:54:09 UTC) #3
Matt Perry
I'm conflicted. Erik, WDYT? On the one hand, Adblock needs something like this, or it ...
9 years, 3 months ago (2011-09-08 00:14:33 UTC) #4
Mihai Parparita -not on Chrome
Dominic: do you have any sense of how complex the proposed WebKit changes in http://crbug.com/94284 ...
9 years, 3 months ago (2011-09-08 00:28:18 UTC) #5
battre
Not really, but it should be doable. For large parts it is just replicating functionality ...
9 years, 3 months ago (2011-09-08 08:20:08 UTC) #6
battre
I have updated this CL to allow clearing the cache upon reloading. The changes were ...
9 years, 3 months ago (2011-09-15 12:16:34 UTC) #7
battre
Ok, the trybots fail because this depends on https://bugs.webkit.org/show_bug.cgi?id=68154 On 2011/09/15 12:16:34, battre wrote: > ...
9 years, 3 months ago (2011-09-15 12:57:13 UTC) #8
Matt Perry
I'm happy with this compromise. LGTM http://codereview.chromium.org/7835031/diff/7001/chrome/browser/renderer_host/web_cache_manager.h File chrome/browser/renderer_host/web_cache_manager.h (right): http://codereview.chromium.org/7835031/diff/7001/chrome/browser/renderer_host/web_cache_manager.h#newcode185 chrome/browser/renderer_host/web_cache_manager.h:185: enum ClearCacheOccation { ...
9 years, 3 months ago (2011-09-15 18:08:14 UTC) #9
abarth-chromium
http://codereview.chromium.org/7835031/diff/7001/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7835031/diff/7001/content/renderer/render_view.cc#newcode773 content/renderer/render_view.cc:773: WebCache::executePendingClear(); So, this only triggers on reload? Not on ...
9 years, 3 months ago (2011-09-15 18:31:28 UTC) #10
battre
http://codereview.chromium.org/7835031/diff/7001/content/renderer/render_view.cc File content/renderer/render_view.cc (right): http://codereview.chromium.org/7835031/diff/7001/content/renderer/render_view.cc#newcode773 content/renderer/render_view.cc:773: WebCache::executePendingClear(); On 2011/09/15 18:31:29, abarth wrote: > So, this ...
9 years, 3 months ago (2011-09-15 19:27:37 UTC) #11
battre
Thanks for your review. I have addressed your comments. If this is ok with you, ...
9 years, 3 months ago (2011-09-16 12:13:22 UTC) #12
Matt Perry
On 2011/09/16 12:13:22, battre wrote: > Thanks for your review. I have addressed your comments. ...
9 years, 3 months ago (2011-09-16 17:55:42 UTC) #13
abarth-chromium
On Fri, Sep 16, 2011 at 10:55 AM, <[email protected]> wrote: > On 2011/09/16 12:13:22, battre ...
9 years, 3 months ago (2011-09-16 17:58:05 UTC) #14
battre
I have moved all code from webkit and content to chrome. Please take another look.
9 years, 3 months ago (2011-09-19 17:02:08 UTC) #15
Matt Perry
new changes seem OK to me
9 years, 3 months ago (2011-09-19 19:53:58 UTC) #16
battre
This is a friendly ping. Are you happy with the current CL? Regarding the OWNERS ...
9 years, 2 months ago (2011-09-27 19:07:51 UTC) #17
abarth-chromium
On 2011/09/27 19:07:51, battre wrote: > This is a friendly ping. Are you happy with ...
9 years, 2 months ago (2011-09-27 19:09:53 UTC) #18
willchan no longer on Chromium
I think you guys already know, but in case it's not clear, I defer to ...
9 years, 2 months ago (2011-09-27 19:10:35 UTC) #19
battre
On 2011/09/27 19:09:53, abarth wrote: > On 2011/09/27 19:07:51, battre wrote: > > This is ...
9 years, 2 months ago (2011-09-27 19:43:03 UTC) #20
abarth-chromium
I'm not particularly excited about this change, but I'm certainly not going to stand in ...
9 years, 2 months ago (2011-09-27 21:10:38 UTC) #21
commit-bot: I haz the power
CQ is trying tha patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/7835031/30001
9 years, 2 months ago (2011-09-29 14:54:09 UTC) #22
commit-bot: I haz the power
9 years, 2 months ago (2011-09-29 16:54:35 UTC) #23
Change committed as 103289

Powered by Google App Engine
This is Rietveld 408576698