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

Unified Diff: net/http/http_cache_transaction.h

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_cache.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.h
diff --git a/net/http/http_cache_transaction.h b/net/http/http_cache_transaction.h
index 0b4792bd116563c3dea02e2022e766865084d33e..35ca6e4b89fe493653bd0092a4ed27115d2f6e66 100644
--- a/net/http/http_cache_transaction.h
+++ b/net/http/http_cache_transaction.h
@@ -109,6 +109,11 @@ class HttpCache::Transaction : public HttpTransaction {
bypass_lock_for_test_ = true;
}
+ // Generates a failure when attempting to conditionalize a network request.
+ void FailConditionalizationForTest() {
+ fail_conditionalization_for_test_ = true;
+ }
+
// HttpTransaction methods:
int Start(const HttpRequestInfo* request_info,
const CompletionCallback& callback,
@@ -386,6 +391,10 @@ class HttpCache::Transaction : public HttpTransaction {
// between the byte range request and the cached entry.
int DoRestartPartialRequest();
+ // Resets the relavant internal state to remove traces of internal processing
+ // related to range requests. Deletes |partial_| if |delete_object| is true.
+ void ResetPartialState(bool delete_object);
+
// Resets |network_trans_|, which must be non-NULL. Also updates
// |old_network_trans_load_timing_|, which must be NULL when this is called.
void ResetNetworkTransaction();
@@ -432,6 +441,7 @@ class HttpCache::Transaction : public HttpTransaction {
bool vary_mismatch_; // The request doesn't match the stored vary data.
bool couldnt_conditionalize_request_;
bool bypass_lock_for_test_; // A test is exercising the cache lock.
+ bool fail_conditionalization_for_test_; // Fail ConditionalizeRequest.
scoped_refptr<IOBuffer> read_buf_;
int io_buf_len_;
int read_offset_;
« no previous file with comments | « net/http/http_cache.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698