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

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

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 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
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 #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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // provided to SetHeaders(). 48 // provided to SetHeaders().
49 void RestoreHeaders(HttpRequestHeaders* headers) const; 49 void RestoreHeaders(HttpRequestHeaders* headers) const;
50 50
51 // Starts the checks to perform a cache validation. Returns 0 when there is no 51 // Starts the checks to perform a cache validation. Returns 0 when there is no
52 // need to perform more operations because we reached the end of the request 52 // need to perform more operations because we reached the end of the request
53 // (so 0 bytes should be actually returned to the user), a positive number to 53 // (so 0 bytes should be actually returned to the user), a positive number to
54 // indicate that PrepareCacheValidation should be called, or an appropriate 54 // indicate that PrepareCacheValidation should be called, or an appropriate
55 // error code. If this method returns ERR_IO_PENDING, the |callback| will be 55 // error code. If this method returns ERR_IO_PENDING, the |callback| will be
56 // notified when the result is ready. 56 // notified when the result is ready.
57 int ShouldValidateCache(disk_cache::Entry* entry, 57 int ShouldValidateCache(disk_cache::Entry* entry,
58 OldCompletionCallback* callback); 58 const CompletionCallback& callback);
59 59
60 // Builds the required |headers| to perform the proper cache validation for 60 // Builds the required |headers| to perform the proper cache validation for
61 // the next range to be fetched. 61 // the next range to be fetched.
62 void PrepareCacheValidation(disk_cache::Entry* entry, 62 void PrepareCacheValidation(disk_cache::Entry* entry,
63 HttpRequestHeaders* headers); 63 HttpRequestHeaders* headers);
64 64
65 // Returns true if the current range is stored in the cache. 65 // Returns true if the current range is stored in the cache.
66 bool IsCurrentRangeCached() const; 66 bool IsCurrentRangeCached() const;
67 67
68 // Returns true if the current range is the last one needed to fulfill the 68 // Returns true if the current range is the last one needed to fulfill the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 int cached_min_len_; 129 int cached_min_len_;
130 HttpByteRange byte_range_; // The range requested by the user. 130 HttpByteRange byte_range_; // The range requested by the user.
131 // The clean set of extra headers (no ranges). 131 // The clean set of extra headers (no ranges).
132 HttpRequestHeaders extra_headers_; 132 HttpRequestHeaders extra_headers_;
133 bool range_present_; // True if next range entry is already stored. 133 bool range_present_; // True if next range entry is already stored.
134 bool final_range_; 134 bool final_range_;
135 bool sparse_entry_; 135 bool sparse_entry_;
136 bool truncated_; // We have an incomplete 200 stored. 136 bool truncated_; // We have an incomplete 200 stored.
137 bool initial_validation_; // Only used for truncated entries. 137 bool initial_validation_; // Only used for truncated entries.
138 Core* core_; 138 Core* core_;
139 OldCompletionCallback* callback_; 139 CompletionCallback callback_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(PartialData); 141 DISALLOW_COPY_AND_ASSIGN(PartialData);
142 }; 142 };
143 143
144 } // namespace net 144 } // namespace net
145 145
146 #endif // NET_HTTP_PARTIAL_DATA_H_ 146 #endif // NET_HTTP_PARTIAL_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698