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

Issue 2398613002: [HttpCache] LOAD_ONLY_FROM_CACHE should not imply LOAD_PREFERRING_CACHE (Closed)

Created:
4 years, 2 months ago by jkarlin
Modified:
4 years, 1 month ago
CC:
android-webview-reviews_chromium.org, asanka, cbentzel+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, gavinp+disk_chromium.org, grt+watch_chromium.org, jam, kinuko+cache_chromium.org, loading-reviews_chromium.org, mlamouri+watch-content_chromium.org, mmenke, nasko+codewatch_chromium.org, Randy Smith (Not in Mondays), rginda+watch_chromium.org, wifiprefetch-reviews_google.com
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[HttpCache] LOAD_ONLY_FROM_CACHE should not imply LOAD_PREFERRING_CACHE LOAD_ONLY_FROM_CACHE won't go to the network, but it also skips the check to see if the cache entry is valid. Some clients need to load only from cache, but also ensure that the returned entry is valid. To accomplish this, this CL: 1) Renames LOAD_PREFERRING_CACHE -> LOAD_SKIP_CACHE_VALIDATION 2) Changes LOAD_ONLY_FROM_CACHE to check entry validity by default 3) Changes all existing uses of LOAD_ONLY_FROM_CACHE to also add LOAD_SKIP_CACHE_VALIDATION, keeping the old behavior BUG=652649 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/a067deede18317270cd2f118615650a2a755de8e Cr-Commit-Position: refs/heads/master@{#428026}

Patch Set 1 #

Patch Set 2 : Rebase and namespace fix #

Patch Set 3 : Added test #

Patch Set 4 : Nit #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Fix test and address comment from PS4 #

Patch Set 7 : Always check vary #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -68 lines) Patch
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/safe_browsing/threat_details_cache.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/precache/core/precache_fetcher.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M components/precache/core/precache_fetcher_unittest.cc View 1 2 3 chunks +9 lines, -3 lines 0 comments Download
M content/browser/download/download_request_core.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/download/save_file_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/loader/async_revalidation_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/web_url_request_util.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M ios/net/crn_http_protocol_handler.mm View 2 chunks +4 lines, -4 lines 0 comments Download
M net/base/load_flags_list.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 6 2 chunks +7 lines, -4 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 3 4 5 31 chunks +59 lines, -32 lines 0 comments Download
M net/url_request/sdch_dictionary_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 71 (49 generated)
jkarlin
gavinp@ PTAL at everything, thank you!
4 years, 2 months ago (2016-10-07 15:05:37 UTC) #16
gavinp
It's somewhat tricky that LOAD_SKIP_CACHE_VALIDATION has two meanings: one where it respects Vary, and one ...
4 years, 2 months ago (2016-10-07 16:45:09 UTC) #23
jkarlin
https://codereview.chromium.org/2398613002/diff/60001/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/2398613002/diff/60001/net/http/http_cache_transaction.cc#newcode1994 net/http/http_cache_transaction.cc:1994: RequiresValidation() != VALIDATION_NONE) On 2016/10/07 16:45:09, gavinp wrote: > ...
4 years, 2 months ago (2016-10-13 15:33:58 UTC) #36
jkarlin
On 2016/10/07 16:45:09, gavinp wrote: > It's somewhat tricky that LOAD_SKIP_CACHE_VALIDATION has two meanings: one ...
4 years, 2 months ago (2016-10-13 15:36:31 UTC) #37
jkarlin
On 2016/10/13 15:36:31, jkarlin wrote: > On 2016/10/07 16:45:09, gavinp wrote: > > It's somewhat ...
4 years, 2 months ago (2016-10-13 17:51:23 UTC) #42
jkarlin
Ping gavinp@, WDYT?
4 years, 2 months ago (2016-10-18 11:59:23 UTC) #43
jkarlin
gavinp@ PTAL. I think we should always respect vary.
4 years, 2 months ago (2016-10-20 15:40:12 UTC) #44
gavinp
On 2016/10/20 15:40:12, jkarlin wrote: > gavinp@ PTAL. I think we should always respect vary. ...
4 years, 2 months ago (2016-10-20 16:26:53 UTC) #45
gavinp
On 2016/10/20 15:40:12, jkarlin wrote: > gavinp@ PTAL. I think we should always respect vary. ...
4 years, 2 months ago (2016-10-20 16:26:53 UTC) #46
gavinp
lgtm, thanks!
4 years, 2 months ago (2016-10-21 14:27:48 UTC) #47
jkarlin
Thanks!
4 years, 2 months ago (2016-10-21 14:28:58 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2398613002/160001
4 years, 2 months ago (2016-10-21 14:29:28 UTC) #51
jkarlin
On 2016/10/21 14:29:28, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 2 months ago (2016-10-21 14:29:52 UTC) #52
jkarlin
ellyjones@chromium.org: Please review changes in ios/ torne@chromium.org: Please review changes in android_webview/ jochen@chromium.org: Please review ...
4 years, 2 months ago (2016-10-21 14:33:53 UTC) #54
jochen (gone - plz use gerrit)
lgtm
4 years, 2 months ago (2016-10-24 07:22:42 UTC) #55
Torne
android_webview LGTM
4 years, 1 month ago (2016-10-24 11:59:49 UTC) #56
jkarlin
droger@chromium.org: Please review changes in ios/ Thanks!
4 years, 1 month ago (2016-10-27 12:10:05 UTC) #59
droger
lgtm
4 years, 1 month ago (2016-10-27 13:44:55 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2398613002/160001
4 years, 1 month ago (2016-10-27 13:47:17 UTC) #66
jkarlin
Thanks all!
4 years, 1 month ago (2016-10-27 13:48:13 UTC) #67
commit-bot: I haz the power
Committed patchset #7 (id:160001)
4 years, 1 month ago (2016-10-27 14:48:59 UTC) #69
commit-bot: I haz the power
4 years, 1 month ago (2016-10-27 14:51:17 UTC) #71
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a067deede18317270cd2f118615650a2a755de8e
Cr-Commit-Position: refs/heads/master@{#428026}

Powered by Google App Engine
This is Rietveld 408576698