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

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

Issue 448003: Merge 33253 - Revert 33133 Http cache: Add code to restart a network request... (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 true on success. 159 // Makes sure that a 206 response is expected. Returns a network error code.
160 // On success, |partial_content| will be set to true if we are processing a 160 bool ValidatePartialResponse(const HttpResponseHeaders* headers);
161 // partial entry.
162 bool ValidatePartialResponse(const HttpResponseHeaders* headers,
163 bool* partial_content);
164 161
165 // Handles a response validation error by bypassing the cache. 162 // Handles a response validation error by bypassing the cache.
166 void IgnoreRangeRequest(); 163 void IgnoreRangeRequest();
167 164
168 // Reads data from the network. 165 // Reads data from the network.
169 int ReadFromNetwork(IOBuffer* data, int data_len); 166 int ReadFromNetwork(IOBuffer* data, int data_len);
170 167
171 // Reads data from the cache entry. 168 // Reads data from the cache entry.
172 int ReadFromEntry(IOBuffer* data, int data_len); 169 int ReadFromEntry(IOBuffer* data, int data_len);
173 170
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 cache_read_callback_; 258 cache_read_callback_;
262 scoped_refptr<CancelableCompletionCallback<Transaction> > 259 scoped_refptr<CancelableCompletionCallback<Transaction> >
263 cache_write_callback_; 260 cache_write_callback_;
264 scoped_refptr<CancelableCompletionCallback<Transaction> > 261 scoped_refptr<CancelableCompletionCallback<Transaction> >
265 entry_ready_callback_; 262 entry_ready_callback_;
266 }; 263 };
267 264
268 } // namespace net 265 } // namespace net
269 266
270 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 267 #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