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

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

Issue 7468017: Http Cache: Keep track of whether we are doing byte range (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_cache_transaction.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 10 #pragma once
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 // Called to begin validating the cache entry. Returns network error code. 233 // Called to begin validating the cache entry. Returns network error code.
234 int BeginCacheValidation(); 234 int BeginCacheValidation();
235 235
236 // Called to begin validating an entry that stores partial content. Returns 236 // Called to begin validating an entry that stores partial content. Returns
237 // a network error code. 237 // a network error code.
238 int BeginPartialCacheValidation(); 238 int BeginPartialCacheValidation();
239 239
240 // Validates the entry headers against the requested range and continues with 240 // Validates the entry headers against the requested range and continues with
241 // the validation of the rest of the entry. Returns a network error code. 241 // the validation of the rest of the entry. Returns a network error code.
242 int ValidateEntryHeadersAndContinue(bool byte_range_requested); 242 int ValidateEntryHeadersAndContinue();
243 243
244 // Called to start requests which were given an "if-modified-since" or 244 // Called to start requests which were given an "if-modified-since" or
245 // "if-none-match" validation header by the caller (NOT when the request was 245 // "if-none-match" validation header by the caller (NOT when the request was
246 // conditionalized internally in response to LOAD_VALIDATE_CACHE). 246 // conditionalized internally in response to LOAD_VALIDATE_CACHE).
247 // Returns a network error code. 247 // Returns a network error code.
248 int BeginExternallyConditionalizedRequest(); 248 int BeginExternallyConditionalizedRequest();
249 249
250 // Called to restart a network transaction after an error. Returns network 250 // Called to restart a network transaction after an error. Returns network
251 // error code. 251 // error code.
252 int RestartNetworkRequest(); 252 int RestartNetworkRequest();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 HttpResponseInfo response_; 340 HttpResponseInfo response_;
341 HttpResponseInfo auth_response_; 341 HttpResponseInfo auth_response_;
342 const HttpResponseInfo* new_response_; 342 const HttpResponseInfo* new_response_;
343 std::string cache_key_; 343 std::string cache_key_;
344 Mode mode_; 344 Mode mode_;
345 State target_state_; 345 State target_state_;
346 bool reading_; // We are already reading. 346 bool reading_; // We are already reading.
347 bool invalid_range_; // We may bypass the cache for this request. 347 bool invalid_range_; // We may bypass the cache for this request.
348 bool truncated_; // We don't have all the response data. 348 bool truncated_; // We don't have all the response data.
349 bool is_sparse_; // The data is stored in sparse byte ranges. 349 bool is_sparse_; // The data is stored in sparse byte ranges.
350 bool range_requested_; // The user requested a byte range.
350 bool handling_206_; // We must deal with this 206 response. 351 bool handling_206_; // We must deal with this 206 response.
351 bool cache_pending_; // We are waiting for the HttpCache. 352 bool cache_pending_; // We are waiting for the HttpCache.
352 bool done_reading_; 353 bool done_reading_;
353 scoped_refptr<IOBuffer> read_buf_; 354 scoped_refptr<IOBuffer> read_buf_;
354 int io_buf_len_; 355 int io_buf_len_;
355 int read_offset_; 356 int read_offset_;
356 int effective_load_flags_; 357 int effective_load_flags_;
357 int write_len_; 358 int write_len_;
358 scoped_ptr<PartialData> partial_; // We are dealing with range requests. 359 scoped_ptr<PartialData> partial_; // We are dealing with range requests.
359 uint64 final_upload_progress_; 360 uint64 final_upload_progress_;
360 CompletionCallbackImpl<Transaction> io_callback_; 361 CompletionCallbackImpl<Transaction> io_callback_;
361 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; 362 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_;
362 scoped_refptr<CancelableCompletionCallback<Transaction> > 363 scoped_refptr<CancelableCompletionCallback<Transaction> >
363 write_headers_callback_; 364 write_headers_callback_;
364 }; 365 };
365 366
366 } // namespace net 367 } // namespace net
367 368
368 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 369 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_cache_transaction.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698