summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2015-03-20 14:57:27 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-20 21:58:11 +0000
commit06681dfba5c89956f650aea3767c08d41f22bac1 (patch)
treebdba95a02f29c5b7b8932634748e6bc43532fea7
parente2d3d2eb9e39868db7df9a68ac50aed6e053ca5c (diff)
downloadchromium_src-06681dfba5c89956f650aea3767c08d41f22bac1.zip
chromium_src-06681dfba5c89956f650aea3767c08d41f22bac1.tar.gz
chromium_src-06681dfba5c89956f650aea3767c08d41f22bac1.tar.bz2
Remove HTTP cache Record/Playback support
This removes the ability to save and replay browsing sessions to/from the cache. BUG=469256 Review URL: https://codereview.chromium.org/1008723006 Cr-Commit-Position: refs/heads/master@{#321643}
-rw-r--r--chrome/browser/chrome_content_browser_client.cc2
-rw-r--r--chrome/browser/net/cookie_store_util.cc16
-rw-r--r--chrome/browser/net/cookie_store_util.h8
-rw-r--r--chrome/browser/profiles/profile_impl_io_data.cc28
-rw-r--r--chrome/browser/ui/browser_window_state.cc11
-rw-r--r--chrome/chrome_renderer.gypi2
-rw-r--r--chrome/common/chrome_constants.cc12
-rw-r--r--chrome/common/chrome_constants.h2
-rw-r--r--chrome/common/chrome_switches.cc10
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/renderer/chrome_content_renderer_client.cc6
-rw-r--r--chrome/renderer/playback_extension.cc48
-rw-r--r--chrome/renderer/playback_extension.h32
-rw-r--r--net/http/http_cache.cc41
-rw-r--r--net/http/http_cache.h5
-rw-r--r--net/http/http_cache_transaction.cc58
-rw-r--r--tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt2
17 files changed, 23 insertions, 262 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 139feeb..f3d767f 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1427,14 +1427,12 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kEnablePluginPlaceholderShadowDom,
switches::kJavaScriptHarmony,
switches::kMessageLoopHistogrammer,
- switches::kPlaybackMode,
switches::kPpapiFlashArgs,
switches::kPpapiFlashPath,
switches::kPpapiFlashVersion,
switches::kProfilingAtStart,
switches::kProfilingFile,
switches::kProfilingFlush,
- switches::kRecordMode,
translate::switches::kTranslateSecurityOrigin,
};
diff --git a/chrome/browser/net/cookie_store_util.cc b/chrome/browser/net/cookie_store_util.cc
index b4cf930..d6c8a50 100644
--- a/chrome/browser/net/cookie_store_util.cc
+++ b/chrome/browser/net/cookie_store_util.cc
@@ -80,22 +80,6 @@ class ChromeCookieMonsterDelegate : public net::CookieMonsterDelegate {
namespace chrome_browser_net {
-bool IsCookieRecordMode() {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- // Only allow Record Mode if we are in a Debug build or where we are running
- // a cycle, and the user has limited control.
- return command_line.HasSwitch(switches::kRecordMode) &&
- chrome::kRecordModeEnabled;
-}
-
-bool ShouldUseInMemoryCookiesAndCache() {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
- return IsCookieRecordMode() ||
- command_line.HasSwitch(switches::kPlaybackMode);
-}
-
net::CookieMonsterDelegate* CreateCookieDelegate(Profile* profile) {
return new EvictedDomainCookieCounter(
new ChromeCookieMonsterDelegate(profile));
diff --git a/chrome/browser/net/cookie_store_util.h b/chrome/browser/net/cookie_store_util.h
index 5cb17a7..b4b60ff 100644
--- a/chrome/browser/net/cookie_store_util.h
+++ b/chrome/browser/net/cookie_store_util.h
@@ -16,14 +16,6 @@ class CookieMonsterDelegate;
namespace chrome_browser_net {
-// Returns true if cookie-like storage systems should enter record mode for
-// debugging.
-bool IsCookieRecordMode();
-
-// Returns true if command line flags indicate that cookie-like storage systems
-// should be forced to be in memory only.
-bool ShouldUseInMemoryCookiesAndCache();
-
// Factory method for creating a CookieStore delegate that sends
// chrome::NOTIFICATION_COOKIE_CHANGED for the given profile. This
// delegate is stateless so only one is necessary per profile.
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 3add9ee..d64039e 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -510,19 +510,6 @@ void ProfileImplIOData::InitializeInternal(
scoped_refptr<net::CookieStore> cookie_store = NULL;
net::ChannelIDService* channel_id_service = NULL;
- if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) {
- // Don't use existing cookies and use an in-memory store.
- using content::CookieStoreConfig;
- cookie_store = content::CreateCookieStore(CookieStoreConfig(
- base::FilePath(),
- CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
- NULL,
- profile_params->cookie_monster_delegate.get()));
- // Don't use existing channel ids and use an in-memory store.
- channel_id_service = new net::ChannelIDService(
- new net::DefaultChannelIDStore(NULL),
- base::WorkerPool::GetTaskRunner(true));
- }
// TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed.
tracked_objects::ScopedTracker tracking_profile5(
@@ -590,12 +577,6 @@ void ProfileImplIOData::InitializeInternal(
main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path);
- if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) {
- main_cache->set_mode(
- chrome_browser_net::IsCookieRecordMode() ?
- net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
- }
-
main_http_factory_.reset(main_cache.release());
main_context->set_http_transaction_factory(main_http_factory_.get());
@@ -736,15 +717,6 @@ net::URLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
scoped_refptr<net::CookieStore> cookie_store = NULL;
if (partition_descriptor.in_memory) {
cookie_store = content::CreateCookieStore(content::CookieStoreConfig());
- } else if (chrome_browser_net::ShouldUseInMemoryCookiesAndCache()) {
- // Don't use existing cookies and use an in-memory store.
- // TODO(creis): We should have a cookie delegate for notifying the cookie
- // extensions API, but we need to update it to understand isolated apps
- // first.
- cookie_store = content::CreateCookieStore(content::CookieStoreConfig());
- app_http_cache->set_mode(
- chrome_browser_net::IsCookieRecordMode() ?
- net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
}
// Use an app-specific cookie store.
diff --git a/chrome/browser/ui/browser_window_state.cc b/chrome/browser/ui/browser_window_state.cc
index f31e5ec..c59e7fd 100644
--- a/chrome/browser/ui/browser_window_state.cc
+++ b/chrome/browser/ui/browser_window_state.cc
@@ -140,18 +140,7 @@ void GetSavedWindowBoundsAndShowState(const Browser* browser,
const base::CommandLine& parsed_command_line =
*base::CommandLine::ForCurrentProcess();
- bool record_mode = parsed_command_line.HasSwitch(switches::kRecordMode);
- bool playback_mode = parsed_command_line.HasSwitch(switches::kPlaybackMode);
- if (record_mode || playback_mode) {
- // In playback/record mode we always fix the size of the browser and
- // move it to (0,0). The reason for this is two reasons: First we want
- // resize/moves in the playback to still work, and Second we want
- // playbacks to work (as much as possible) on machines w/ different
- // screen sizes.
- *bounds = gfx::Rect(0, 0, 800, 600);
- }
- // The following options override playback/record.
if (parsed_command_line.HasSwitch(switches::kWindowSize)) {
std::string str =
parsed_command_line.GetSwitchValueASCII(switches::kWindowSize);
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index fc7ea3a..4a09173 100644
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -34,8 +34,6 @@
'renderer/net_benchmarking_extension.h',
'renderer/page_load_histograms.cc',
'renderer/page_load_histograms.h',
- 'renderer/playback_extension.cc',
- 'renderer/playback_extension.h',
'renderer/plugins/chrome_plugin_placeholder.cc',
'renderer/plugins/chrome_plugin_placeholder.h',
'renderer/plugins/plugin_uma.cc',
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 19d4a0d..b97e7fa 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -199,18 +199,6 @@ const base::FilePath::CharType kPepperFlashPluginFilename[] =
// directory names
const wchar_t kUserDataDirname[] = L"User Data";
-// We don't enable record mode in the released product because users could
-// potentially be tricked into running a product in record mode without
-// knowing it. Enable in debug builds. Playback mode is allowed always,
-// because it is useful for testing and not hazardous by itself.
-#ifndef NDEBUG
-// const bool kRecordModeEnabled = true;
-#else
-// const bool kRecordModeEnabled = false;
-#endif
-
-const bool kRecordModeEnabled = true;
-
#if defined(OS_ANDROID) || defined(OS_IOS)
const bool kEnableTouchIcon = true;
#else
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index a64bcdd..be9ba60 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -104,8 +104,6 @@ extern const base::FilePath::CharType kPepperFlashPluginFilename[];
// directory names
extern const wchar_t kUserDataDirname[];
-extern const bool kRecordModeEnabled;
-
// Are touch icons enabled? False by default.
extern const bool kEnableTouchIcon;
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 5141602..4156ef9 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -878,10 +878,6 @@ const char kPermissionRequestApiScope[] = "permission-request-api-scope";
// TODO(bauerb): Remove when this flag is not needed anymore.
const char kPermissionRequestApiUrl[] = "permission-request-api-url";
-// Read previously recorded data from the cache. Only cached data is read.
-// See kRecordMode.
-const char kPlaybackMode[] = "playback-mode";
-
// Use the PPAPI (Pepper) Flash found at the given path.
const char kPpapiFlashPath[] = "ppapi-flash-path";
@@ -973,12 +969,6 @@ const char kQuicMaxPacketLength[] = "quic-max-packet-length";
// Specifies the version of QUIC to use.
const char kQuicVersion[] = "quic-version";
-// Chrome supports a playback and record mode. Record mode saves *everything*
-// to the cache. Playback mode reads data exclusively from the cache. This
-// allows us to record a session into the cache and then replay it at will.
-// See also kPlaybackMode.
-const char kRecordMode[] = "record-mode";
-
// Remember user proceeds through SSL interstitials for a specified amount of
// time. In particular, remember these decisions through session restart. The
// time delta to remember certificates should be specified in seconds.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index d5f185f..7d45bed 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -247,7 +247,6 @@ extern const char kPackExtensionKey[];
extern const char kParentProfile[];
extern const char kPermissionRequestApiScope[];
extern const char kPermissionRequestApiUrl[];
-extern const char kPlaybackMode[];
extern const char kPpapiFlashPath[];
extern const char kPpapiFlashVersion[];
extern const char kPrefetchSearchResults[];
@@ -272,7 +271,6 @@ extern const char kProxyServer[];
extern const char kQuicConnectionOptions[];
extern const char kQuicMaxPacketLength[];
extern const char kQuicVersion[];
-extern const char kRecordMode[];
extern const char kRememberCertErrorDecisions[];
extern const char kResetAppListInstallState[];
extern const char kRestoreLastSession[];
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index b95fe8f..e4ea3df 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -38,7 +38,6 @@
#include "chrome/renderer/net_benchmarking_extension.h"
#include "chrome/renderer/page_load_histograms.h"
#include "chrome/renderer/pepper/pepper_helper.h"
-#include "chrome/renderer/playback_extension.h"
#include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
#include "chrome/renderer/plugins/plugin_preroller.h"
#include "chrome/renderer/plugins/plugin_uma.h"
@@ -431,11 +430,6 @@ void ChromeContentRendererClient::RenderThreadStarted() {
if (command_line->HasSwitch(switches::kInstantProcess))
thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get());
- if (command_line->HasSwitch(switches::kPlaybackMode) ||
- command_line->HasSwitch(switches::kRecordMode)) {
- thread->RegisterExtension(extensions_v8::PlaybackExtension::Get());
- }
-
// chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages
// should not be accessible by normal content, and should also be unable to
// script anything but themselves (to help limit the damage that a corrupt
diff --git a/chrome/renderer/playback_extension.cc b/chrome/renderer/playback_extension.cc
deleted file mode 100644
index 5f9f017..0000000
--- a/chrome/renderer/playback_extension.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/renderer/playback_extension.h"
-
-#include "v8/include/v8.h"
-
-const char kPlaybackExtensionName[] = "v8/PlaybackMode";
-
-namespace extensions_v8 {
-
-v8::Extension* PlaybackExtension::Get() {
- v8::Extension* extension = new v8::Extension(
- kPlaybackExtensionName,
- "(function () {"
- " var orig_date = Date;"
- " var x = 0;"
- " var time_seed = 1204251968254;"
- " Math.random = function() {"
- " x += .1;"
- " return (x % 1);"
- " };"
- " Date = function() {"
- " if (this instanceof Date) {"
- " switch (arguments.length) {"
- " case 0: return new orig_date(time_seed += 50);"
- " case 1: return new orig_date(arguments[0]);"
- " default: return new orig_date(arguments[0], arguments[1],"
- " arguments.length >= 3 ? arguments[2] : 1,"
- " arguments.length >= 4 ? arguments[3] : 0,"
- " arguments.length >= 5 ? arguments[4] : 0,"
- " arguments.length >= 6 ? arguments[5] : 0,"
- " arguments.length >= 7 ? arguments[6] : 0);"
- " }"
- " }"
- " return new Date().toString();"
- " };"
- " Date.__proto__ = orig_date;"
- " Date.prototype.constructor = Date;"
- " orig_date.now = function() {"
- " return new Date().getTime();"
- " };"
- "})()");
- return extension;
-}
-
-} // namespace extensions_v8
diff --git a/chrome/renderer/playback_extension.h b/chrome/renderer/playback_extension.h
deleted file mode 100644
index 9d10fe0..0000000
--- a/chrome/renderer/playback_extension.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_RENDERER_PLAYBACK_EXTENSION_H_
-#define CHROME_RENDERER_PLAYBACK_EXTENSION_H_
-
-namespace v8 {
-class Extension;
-}
-
-namespace extensions_v8 {
-
-// Inject code which overrides a few common JS functions for implementing
-// randomness. In order to implement effective record & playback of
-// websites, it is important that the URLs not change. Many popular web
-// based apps use randomness in URLs to unique-ify urls for proxies.
-// Unfortunately, this breaks playback.
-// To work around this, we take the two most common client-side randomness
-// generators and make them constant. They really need to be constant
-// (rather than a constant seed followed by constant change)
-// because the playback mode wants flexibility in how it plays them back
-// and cannot always guarantee that requests for randomness are played back
-// in exactly the same order in which they were recorded.
-class PlaybackExtension {
- public:
- static v8::Extension* Get();
-};
-
-} // namespace extensions_v8
-
-#endif // CHROME_RENDERER_PLAYBACK_EXTENSION_H_
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 5260410..dc6f516 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -721,39 +721,16 @@ std::string HttpCache::GenerateCacheKey(const HttpRequestInfo* request) {
// Strip out the reference, username, and password sections of the URL.
std::string url = HttpUtil::SpecForRequest(request->url);
- DCHECK(mode_ != DISABLE);
- if (mode_ == NORMAL) {
- // No valid URL can begin with numerals, so we should not have to worry
- // about collisions with normal URLs.
- if (request->upload_data_stream &&
- request->upload_data_stream->identifier()) {
- url.insert(0, base::StringPrintf(
- "%" PRId64 "/", request->upload_data_stream->identifier()));
- }
- return url;
+ DCHECK_NE(DISABLE, mode_);
+ // No valid URL can begin with numerals, so we should not have to worry
+ // about collisions with normal URLs.
+ if (request->upload_data_stream &&
+ request->upload_data_stream->identifier()) {
+ url.insert(0,
+ base::StringPrintf("%" PRId64 "/",
+ request->upload_data_stream->identifier()));
}
-
- // In playback and record mode, we cache everything.
-
- // Lazily initialize.
- if (playback_cache_map_ == NULL)
- playback_cache_map_.reset(new PlaybackCacheMap());
-
- // Each time we request an item from the cache, we tag it with a
- // generation number. During playback, multiple fetches for the same
- // item will use the same generation number and pull the proper
- // instance of an URL from the cache.
- int generation = 0;
- DCHECK(playback_cache_map_ != NULL);
- if (playback_cache_map_->find(url) != playback_cache_map_->end())
- generation = (*playback_cache_map_)[url];
- (*playback_cache_map_)[url] = generation + 1;
-
- // The key into the cache is GENERATION # + METHOD + URL.
- std::string result = base::IntToString(generation);
- result.append(request->method);
- result.append(url);
- return result;
+ return url;
}
void HttpCache::DoomActiveEntry(const std::string& key) {
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 33b89f3..e459475 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -72,11 +72,6 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
enum Mode {
// Normal mode just behaves like a standard web cache.
NORMAL = 0,
- // Record mode caches everything for purposes of offline playback.
- RECORD,
- // Playback mode replays from a cache without considering any
- // standard invalidations.
- PLAYBACK,
// Disables reads and writes from the cache.
// Equivalent to setting LOAD_DISABLE_CACHE on every request.
DISABLE
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 7f01252..7b29dce 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1421,8 +1421,6 @@ int HttpCache::Transaction::DoOpenEntryComplete(int result) {
next_state_ = STATE_SEND_REQUEST;
return OK;
}
- if (cache_->mode() == PLAYBACK)
- DVLOG(1) << "Playback Cache Miss: " << request_->url;
// The entry does not exist, and we are not permitted to create a new entry,
// so we must fail.
@@ -2257,24 +2255,8 @@ void HttpCache::Transaction::SetRequest(const BoundNetLog& net_log,
request_ = request;
effective_load_flags_ = request_->load_flags;
- switch (cache_->mode()) {
- case NORMAL:
- break;
- case RECORD:
- // When in record mode, we want to NEVER load from the cache.
- // The reason for this is because we save the Set-Cookie headers
- // (intentionally). If we read from the cache, we replay them
- // prematurely.
- effective_load_flags_ |= LOAD_BYPASS_CACHE;
- break;
- case PLAYBACK:
- // When in playback mode, we want to load exclusively from the cache.
- effective_load_flags_ |= LOAD_ONLY_FROM_CACHE;
- break;
- case DISABLE:
- effective_load_flags_ |= LOAD_DISABLE_CACHE;
- break;
- }
+ if (cache_->mode() == DISABLE)
+ effective_load_flags_ |= LOAD_DISABLE_CACHE;
// Some headers imply load flags. The order here is significant.
//
@@ -2373,11 +2355,6 @@ bool HttpCache::Transaction::ShouldPassThrough() {
if (!cache_->disk_cache_.get())
return true;
- // When using the record/playback modes, we always use the cache
- // and we never pass through.
- if (cache_->mode() == RECORD || cache_->mode() == PLAYBACK)
- return false;
-
if (effective_load_flags_ & LOAD_DISABLE_CACHE)
return true;
@@ -2621,10 +2598,6 @@ ValidationType HttpCache::Transaction::RequiresValidation() {
// - make sure we have a matching request method
// - watch out for cached responses that depend on authentication
- // In playback mode, nothing requires validation.
- if (cache_->mode() == net::HttpCache::PLAYBACK)
- return VALIDATION_NONE;
-
if (response_.vary_data.is_valid() &&
!response_.vary_data.MatchesRequest(*request_,
*response_.headers.get())) {
@@ -2986,17 +2959,16 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
if (!entry_)
return OK;
- // Do not cache no-store content (unless we are record mode). Do not cache
- // content with cert errors either. This is to prevent not reporting net
- // errors when loading a resource from the cache. When we load a page over
- // HTTPS with a cert error we show an SSL blocking page. If the user clicks
- // proceed we reload the resource ignoring the errors. The loaded resource
- // is then cached. If that resource is subsequently loaded from the cache,
- // no net error is reported (even though the cert status contains the actual
- // errors) and no SSL blocking page is shown. An alternative would be to
- // reverse-map the cert status to a net error and replay the net error.
- if ((cache_->mode() != RECORD &&
- response_.headers->HasHeaderValue("cache-control", "no-store")) ||
+ // Do not cache no-store content. Do not cache content with cert errors
+ // either. This is to prevent not reporting net errors when loading a
+ // resource from the cache. When we load a page over HTTPS with a cert error
+ // we show an SSL blocking page. If the user clicks proceed we reload the
+ // resource ignoring the errors. The loaded resource is then cached. If that
+ // resource is subsequently loaded from the cache, no net error is reported
+ // (even though the cert status contains the actual errors) and no SSL
+ // blocking page is shown. An alternative would be to reverse-map the cert
+ // status to a net error and replay the net error.
+ if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||
net::IsCertStatusError(response_.ssl_info.cert_status)) {
DoneWritingToEntry(false);
if (net_log_.IsLogging())
@@ -3008,13 +2980,11 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
if (cache_->cert_cache() && response_.ssl_info.is_valid())
WriteCertChain();
- // When writing headers, we normally only write the non-transient
- // headers; when in record mode, record everything.
- bool skip_transient_headers = (cache_->mode() != RECORD);
-
if (truncated)
DCHECK_EQ(200, response_.headers->response_code());
+ // When writing headers, we normally only write the non-transient headers.
+ bool skip_transient_headers = true;
scoped_refptr<PickledIOBuffer> data(new PickledIOBuffer());
response_.Persist(data->pickle(), skip_transient_headers, truncated);
data->Done();
diff --git a/tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt b/tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt
index 5abd383a..337b367 100644
--- a/tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt
+++ b/tools/valgrind/gtest_exclude/browser_tests.gtest-memcheck.txt
@@ -43,8 +43,6 @@ NetInternalsTest.netInternalsPrerenderViewFail
NewTabUIBrowserTest.LoadNTPInExistingProcess
OutOfProcessPPAPITest.NetAddressPrivate_GetAnyAddress
OutOfProcessPPAPITest.NetAddressPrivate_ReplacePort
-PageCyclerCachedBrowserTest.PlaybackMode
-PageCyclerCachedBrowserTest.URLNotInCache
PPAPITest.ImeInputEvent
PrerenderBrowserTest.*
PrerenderBrowserTestWithNaCl.PrerenderNaClPluginEnabled