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

Side by Side Diff: net/http/partial_data.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 | « net/http/http_cache_unittest.cc ('k') | net/http/partial_data.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef NET_HTTP_PARTIAL_DATA_H_ 5 #ifndef NET_HTTP_PARTIAL_DATA_H_
6 #define NET_HTTP_PARTIAL_DATA_H_ 6 #define NET_HTTP_PARTIAL_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 // Performs initialization of the object by parsing the request |headers| 39 // Performs initialization of the object by parsing the request |headers|
40 // and verifying that we can process the requested range. Returns true if 40 // and verifying that we can process the requested range. Returns true if
41 // we can process the requested range, and false otherwise. 41 // we can process the requested range, and false otherwise.
42 bool Init(const std::string& headers); 42 bool Init(const std::string& headers);
43 43
44 // Sets the headers that we should use to make byte range requests. This is a 44 // Sets the headers that we should use to make byte range requests. This is a
45 // subset of the request extra headers, with byte-range related headers 45 // subset of the request extra headers, with byte-range related headers
46 // removed. 46 // removed.
47 void SetHeaders(const std::string& headers); 47 void SetHeaders(const std::string& headers);
48 48
49 // Restores the byte-range headers, by appending the byte range to the headers 49 // Restores the byte-range header that was removed during Init(), by appending
50 // provided to SetHeaders(). 50 // the data to the provided |headers|.
51 void RestoreHeaders(std::string* headers) const; 51 void RestoreHeaders(std::string* headers) const;
52 52
53 // Builds the required |headers| to perform the proper cache validation for 53 // Builds the required |headers| to perform the proper cache validation for
54 // the next range to be fetched. Returns 0 when there is no need to perform 54 // the next range to be fetched. Returns 0 when there is no need to perform
55 // more operations because we reached the end of the request (so 0 bytes 55 // more operations because we reached the end of the request (so 0 bytes
56 // should be actually returned to the user), a positive number to indicate 56 // should be actually returned to the user), a positive number to indicate
57 // that |headers| should be used to validate the cache, or an appropriate 57 // that |headers| should be used to validate the cache, or an appropriate
58 // error code. 58 // error code.
59 int PrepareCacheValidation(disk_cache::Entry* entry, std::string* headers); 59 int PrepareCacheValidation(disk_cache::Entry* entry, std::string* headers);
60 60
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool final_range_; 117 bool final_range_;
118 bool sparse_entry_; 118 bool sparse_entry_;
119 bool truncated_; // We have an incomplete 200 stored. 119 bool truncated_; // We have an incomplete 200 stored.
120 120
121 DISALLOW_COPY_AND_ASSIGN(PartialData); 121 DISALLOW_COPY_AND_ASSIGN(PartialData);
122 }; 122 };
123 123
124 } // namespace net 124 } // namespace net
125 125
126 #endif // NET_HTTP_PARTIAL_DATA_H_ 126 #endif // NET_HTTP_PARTIAL_DATA_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/partial_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698