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

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

Issue 437074: Merge 33133 - Http cache: Add code to restart a network request when the... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years 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') | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 int RestartNetworkRequestWithAuth(const std::wstring& username, 149 int RestartNetworkRequestWithAuth(const std::wstring& username,
150 const std::wstring& password); 150 const std::wstring& password);
151 151
152 // Called to determine if we need to validate the cache entry before using it. 152 // Called to determine if we need to validate the cache entry before using it.
153 bool RequiresValidation(); 153 bool RequiresValidation();
154 154
155 // Called to make the request conditional (to ask the server if the cached 155 // Called to make the request conditional (to ask the server if the cached
156 // copy is valid). Returns true if able to make the request conditional. 156 // copy is valid). Returns true if able to make the request conditional.
157 bool ConditionalizeRequest(); 157 bool ConditionalizeRequest();
158 158
159 // Makes sure that a 206 response is expected. Returns a network error code. 159 // Makes sure that a 206 response is expected. Returns true on success.
160 bool ValidatePartialResponse(const HttpResponseHeaders* headers); 160 // On success, |partial_content| will be set to true if we are processing a
161 // partial entry.
162 bool ValidatePartialResponse(const HttpResponseHeaders* headers,
163 bool* partial_content);
161 164
162 // Handles a response validation error by bypassing the cache. 165 // Handles a response validation error by bypassing the cache.
163 void IgnoreRangeRequest(); 166 void IgnoreRangeRequest();
164 167
165 // Reads data from the network. 168 // Reads data from the network.
166 int ReadFromNetwork(IOBuffer* data, int data_len); 169 int ReadFromNetwork(IOBuffer* data, int data_len);
167 170
168 // Reads data from the cache entry. 171 // Reads data from the cache entry.
169 int ReadFromEntry(IOBuffer* data, int data_len); 172 int ReadFromEntry(IOBuffer* data, int data_len);
170 173
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 cache_read_callback_; 261 cache_read_callback_;
259 scoped_refptr<CancelableCompletionCallback<Transaction> > 262 scoped_refptr<CancelableCompletionCallback<Transaction> >
260 cache_write_callback_; 263 cache_write_callback_;
261 scoped_refptr<CancelableCompletionCallback<Transaction> > 264 scoped_refptr<CancelableCompletionCallback<Transaction> >
262 entry_ready_callback_; 265 entry_ready_callback_;
263 }; 266 };
264 267
265 } // namespace net 268 } // namespace net
266 269
267 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 270 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698