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

Issue 118032: Disable the http cache when fetching PAC scripts. Also adds an extra log stat... (Closed)

Created:
11 years, 6 months ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Disable the http cache when fetching PAC scripts. Also adds an extra log statement for when response is non-200. The cache is disabled to avoid problems when switching networks (wouldn't want to re-use cached response from old network after switching to new network). This is only a partial piece for 12293 (still needs to re-trigger auto-detect on network change). BUG=12293 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17572

Patch Set 1 #

Patch Set 2 : Sync #

Total comments: 6

Patch Set 3 : eol-style #

Patch Set 4 : [nochange] moved the CL to another computer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -10 lines) Patch
A net/data/proxy_script_fetcher_unittest/cacheable_1hr.pac View 3 1 chunk +1 line, -0 lines 0 comments Download
A net/data/proxy_script_fetcher_unittest/cacheable_1hr.pac.mock-http-headers View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher.cc View 1 2 3 4 chunks +12 lines, -8 lines 0 comments Download
M net/proxy/proxy_script_fetcher_unittest.cc View 1 2 3 3 chunks +30 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
eroman
http://codereview.chromium.org/118032/diff/11/1002 File net/proxy/proxy_script_fetcher.cc (left): http://codereview.chromium.org/118032/diff/11/1002#oldcode225 Line 225: if (logging::GetMinLogLevel() <= logging::LOG_INFO) { Got rid of ...
11 years, 6 months ago (2009-05-29 22:21:44 UTC) #1
wtc
LGTM. http://codereview.chromium.org/118032/diff/11/1002 File net/proxy/proxy_script_fetcher.cc (right): http://codereview.chromium.org/118032/diff/11/1002#newcode159 Line 159: cur_request_->set_load_flags(LOAD_BYPASS_PROXY | LOAD_DISABLE_CACHE); I wonder if we ...
11 years, 6 months ago (2009-05-29 23:31:39 UTC) #2
eroman
11 years, 6 months ago (2009-05-29 23:59:15 UTC) #3
http://codereview.chromium.org/118032/diff/11/1002
File net/proxy/proxy_script_fetcher.cc (right):

http://codereview.chromium.org/118032/diff/11/1002#newcode159
Line 159: cur_request_->set_load_flags(LOAD_BYPASS_PROXY | LOAD_DISABLE_CACHE);
On 2009/05/29 23:31:39, wtc wrote:
> I wonder if we should only set the LOAD_DISABLE_CACHE
> flag after a network change.  Perhaps that's premature
> optimization?

The scenario that might be tricker to support is detecting if the network was
changed while chrome wasn't running -- in this case, when chrome starts up on
new network we wouldn't want to use the PAC script found in the disk cache. By
not saving into the cache we avoid this problem.

I reckon this current approach is robust. Once we have a mechanism to be
notified of network changes, we can revisit.

http://codereview.chromium.org/118032/diff/11/1003
File net/proxy/proxy_script_fetcher_unittest.cc (right):

http://codereview.chromium.org/118032/diff/11/1003#newcode261
Line 261: EXPECT_TRUE(server->WaitToFinish(20000));
On 2009/05/29 23:31:39, wtc wrote:
> Does the server's destructor wait until the server's
> shut down?  If so, we can just do server = NULL here.

The destructor does not block until the server has finished exitting. (If I
don't call that wait there is a race in the test).

Powered by Google App Engine
This is Rietveld 408576698