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

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

Issue 10382089: Http cache: Don't attempt to doom the same entry multiple times (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « net/http/http_cache.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 10 #pragma once
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // In order to guarantee that the metadata is set to the correct entry, the 78 // In order to guarantee that the metadata is set to the correct entry, the
79 // response (or response info) must be evaluated by the caller, for instance 79 // response (or response info) must be evaluated by the caller, for instance
80 // to make sure that the response_time is as expected, before calling this 80 // to make sure that the response_time is as expected, before calling this
81 // method. 81 // method.
82 int WriteMetadata(IOBuffer* buf, 82 int WriteMetadata(IOBuffer* buf,
83 int buf_len, 83 int buf_len,
84 const CompletionCallback& callback); 84 const CompletionCallback& callback);
85 85
86 // This transaction is being deleted and we are not done writing to the cache. 86 // This transaction is being deleted and we are not done writing to the cache.
87 // We need to indicate that the response data was truncated. Returns true on 87 // We need to indicate that the response data was truncated. Returns true on
88 // success. 88 // success. Keep in mind that this operation may have side effects as deleting
gavinp 2012/05/09 22:10:12 Nit: Keep in mind that this operation may have sid
89 // the active entry.
89 bool AddTruncatedFlag(); 90 bool AddTruncatedFlag();
90 91
92 HttpCache::ActiveEntry* entry() { return entry_; }
93
91 // Returns the LoadState of the writer transaction of a given ActiveEntry. In 94 // Returns the LoadState of the writer transaction of a given ActiveEntry. In
92 // other words, returns the LoadState of this transaction without asking the 95 // other words, returns the LoadState of this transaction without asking the
93 // http cache, because this transaction should be the one currently writing 96 // http cache, because this transaction should be the one currently writing
94 // to the cache entry. 97 // to the cache entry.
95 LoadState GetWriterLoadState() const; 98 LoadState GetWriterLoadState() const;
96 99
97 const CompletionCallback& io_callback() { return io_callback_; } 100 const CompletionCallback& io_callback() { return io_callback_; }
98 101
99 const BoundNetLog& net_log() const; 102 const BoundNetLog& net_log() const;
100 103
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 int write_len_; 370 int write_len_;
368 scoped_ptr<PartialData> partial_; // We are dealing with range requests. 371 scoped_ptr<PartialData> partial_; // We are dealing with range requests.
369 uint64 final_upload_progress_; 372 uint64 final_upload_progress_;
370 base::WeakPtrFactory<Transaction> weak_factory_; 373 base::WeakPtrFactory<Transaction> weak_factory_;
371 CompletionCallback io_callback_; 374 CompletionCallback io_callback_;
372 }; 375 };
373 376
374 } // namespace net 377 } // namespace net
375 378
376 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 379 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« 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