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

Side by Side Diff: net/http/http_cache_transaction.h

Issue 2774603003: Doom and create new entry when validation is not a match (Closed)
Patch Set: Rebased with parent branch Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file declares HttpCache::Transaction, a private class of HttpCache so 5 // This file declares HttpCache::Transaction, a private class of HttpCache so
6 // it should only be included by http_cache.cc 6 // it should only be included by http_cache.cc
7 7
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 STATE_GET_BACKEND_COMPLETE, 191 STATE_GET_BACKEND_COMPLETE,
192 STATE_INIT_ENTRY, 192 STATE_INIT_ENTRY,
193 STATE_OPEN_ENTRY, 193 STATE_OPEN_ENTRY,
194 STATE_OPEN_ENTRY_COMPLETE, 194 STATE_OPEN_ENTRY_COMPLETE,
195 STATE_DOOM_ENTRY, 195 STATE_DOOM_ENTRY,
196 STATE_DOOM_ENTRY_COMPLETE, 196 STATE_DOOM_ENTRY_COMPLETE,
197 STATE_CREATE_ENTRY, 197 STATE_CREATE_ENTRY,
198 STATE_CREATE_ENTRY_COMPLETE, 198 STATE_CREATE_ENTRY_COMPLETE,
199 STATE_ADD_TO_ENTRY, 199 STATE_ADD_TO_ENTRY,
200 STATE_ADD_TO_ENTRY_COMPLETE, 200 STATE_ADD_TO_ENTRY_COMPLETE,
201 STATE_DONE_HEADERS_ADD_TO_ENTRY_COMPLETE,
Randy Smith (Not in Mondays) 2017/04/27 17:47:12 I'm not completely happy with the "done headers" n
shivanisha 2017/05/31 15:51:47 I am inclined to keep it because it is in line wit
201 STATE_CACHE_READ_RESPONSE, 202 STATE_CACHE_READ_RESPONSE,
202 STATE_CACHE_READ_RESPONSE_COMPLETE, 203 STATE_CACHE_READ_RESPONSE_COMPLETE,
203 STATE_TOGGLE_UNUSED_SINCE_PREFETCH, 204 STATE_TOGGLE_UNUSED_SINCE_PREFETCH,
204 STATE_TOGGLE_UNUSED_SINCE_PREFETCH_COMPLETE, 205 STATE_TOGGLE_UNUSED_SINCE_PREFETCH_COMPLETE,
205 STATE_CACHE_DISPATCH_VALIDATION, 206 STATE_CACHE_DISPATCH_VALIDATION,
206 STATE_CACHE_QUERY_DATA, 207 STATE_CACHE_QUERY_DATA,
207 STATE_CACHE_QUERY_DATA_COMPLETE, 208 STATE_CACHE_QUERY_DATA_COMPLETE,
208 STATE_START_PARTIAL_CACHE_VALIDATION, 209 STATE_START_PARTIAL_CACHE_VALIDATION,
209 STATE_COMPLETE_PARTIAL_CACHE_VALIDATION, 210 STATE_COMPLETE_PARTIAL_CACHE_VALIDATION,
210 STATE_SEND_REQUEST, 211 STATE_SEND_REQUEST,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 int DoGetBackendComplete(int result); 263 int DoGetBackendComplete(int result);
263 int DoInitEntry(); 264 int DoInitEntry();
264 int DoOpenEntry(); 265 int DoOpenEntry();
265 int DoOpenEntryComplete(int result); 266 int DoOpenEntryComplete(int result);
266 int DoDoomEntry(); 267 int DoDoomEntry();
267 int DoDoomEntryComplete(int result); 268 int DoDoomEntryComplete(int result);
268 int DoCreateEntry(); 269 int DoCreateEntry();
269 int DoCreateEntryComplete(int result); 270 int DoCreateEntryComplete(int result);
270 int DoAddToEntry(); 271 int DoAddToEntry();
271 int DoAddToEntryComplete(int result); 272 int DoAddToEntryComplete(int result);
273 int DoDoneHeadersAddToEntryComplete(int result);
272 int DoCacheReadResponse(); 274 int DoCacheReadResponse();
273 int DoCacheReadResponseComplete(int result); 275 int DoCacheReadResponseComplete(int result);
274 int DoCacheToggleUnusedSincePrefetch(); 276 int DoCacheToggleUnusedSincePrefetch();
275 int DoCacheToggleUnusedSincePrefetchComplete(int result); 277 int DoCacheToggleUnusedSincePrefetchComplete(int result);
276 int DoCacheDispatchValidation(); 278 int DoCacheDispatchValidation();
277 int DoCacheQueryData(); 279 int DoCacheQueryData();
278 int DoCacheQueryDataComplete(int result); 280 int DoCacheQueryDataComplete(int result);
279 int DoStartPartialCacheValidation(); 281 int DoStartPartialCacheValidation();
280 int DoCompletePartialCacheValidation(int result); 282 int DoCompletePartialCacheValidation(int result);
281 int DoSendRequest(); 283 int DoSendRequest();
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 Mode mode_; 475 Mode mode_;
474 Mode original_mode_; // Used when restarting the transaction. 476 Mode original_mode_; // Used when restarting the transaction.
475 bool reading_; // We are already reading. Never reverts to false once set. 477 bool reading_; // We are already reading. Never reverts to false once set.
476 bool invalid_range_; // We may bypass the cache for this request. 478 bool invalid_range_; // We may bypass the cache for this request.
477 bool truncated_; // We don't have all the response data. 479 bool truncated_; // We don't have all the response data.
478 bool is_sparse_; // The data is stored in sparse byte ranges. 480 bool is_sparse_; // The data is stored in sparse byte ranges.
479 bool range_requested_; // The user requested a byte range. 481 bool range_requested_; // The user requested a byte range.
480 bool handling_206_; // We must deal with this 206 response. 482 bool handling_206_; // We must deal with this 206 response.
481 bool cache_pending_; // We are waiting for the HttpCache. 483 bool cache_pending_; // We are waiting for the HttpCache.
482 bool done_reading_; // All available data was read. 484 bool done_reading_; // All available data was read.
485 // Headers have been received from the network and it's not a match with the
486 // existing entry.
487 bool done_headers_create_new_entry_;
483 bool vary_mismatch_; // The request doesn't match the stored vary data. 488 bool vary_mismatch_; // The request doesn't match the stored vary data.
484 bool couldnt_conditionalize_request_; 489 bool couldnt_conditionalize_request_;
485 bool bypass_lock_for_test_; // A test is exercising the cache lock. 490 bool bypass_lock_for_test_; // A test is exercising the cache lock.
486 bool fail_conditionalization_for_test_; // Fail ConditionalizeRequest. 491 bool fail_conditionalization_for_test_; // Fail ConditionalizeRequest.
487 scoped_refptr<IOBuffer> read_buf_; 492 scoped_refptr<IOBuffer> read_buf_;
488 int io_buf_len_; 493 int io_buf_len_;
489 int read_offset_; 494 int read_offset_;
490 int effective_load_flags_; 495 int effective_load_flags_;
491 int write_len_; 496 int write_len_;
492 std::unique_ptr<PartialData> partial_; // We are dealing with range requests. 497 std::unique_ptr<PartialData> partial_; // We are dealing with range requests.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 bool in_do_loop_; 536 bool in_do_loop_;
532 537
533 base::WeakPtrFactory<Transaction> weak_factory_; 538 base::WeakPtrFactory<Transaction> weak_factory_;
534 539
535 DISALLOW_COPY_AND_ASSIGN(Transaction); 540 DISALLOW_COPY_AND_ASSIGN(Transaction);
536 }; 541 };
537 542
538 } // namespace net 543 } // namespace net
539 544
540 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 545 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698