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

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

Issue 1230113012: [net] Better StopCaching() handling for HttpCache::Transaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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_HTTP_TRANSACTION_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_H_
6 #define NET_HTTP_HTTP_TRANSACTION_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_H_
7 7
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/base/load_states.h" 9 #include "net/base/load_states.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // could not be read. 104 // could not be read.
105 // 105 //
106 // NOTE: The transaction is not responsible for deleting the callback object. 106 // NOTE: The transaction is not responsible for deleting the callback object.
107 // If the operation is not completed immediately, the transaction must acquire 107 // If the operation is not completed immediately, the transaction must acquire
108 // a reference to the provided buffer. 108 // a reference to the provided buffer.
109 // 109 //
110 virtual int Read(IOBuffer* buf, int buf_len, 110 virtual int Read(IOBuffer* buf, int buf_len,
111 const CompletionCallback& callback) = 0; 111 const CompletionCallback& callback) = 0;
112 112
113 // Stops further caching of this request by the HTTP cache, if there is any. 113 // Stops further caching of this request by the HTTP cache, if there is any.
114 // Should only be called when there are no pending operations.
114 virtual void StopCaching() = 0; 115 virtual void StopCaching() = 0;
115 116
116 // Gets the full request headers sent to the server. This is guaranteed to 117 // Gets the full request headers sent to the server. This is guaranteed to
117 // work only if Start returns success and the underlying transaction supports 118 // work only if Start returns success and the underlying transaction supports
118 // it. (Right now, this is only network transactions, not cache ones.) 119 // it. (Right now, this is only network transactions, not cache ones.)
119 // 120 //
120 // Returns true and overwrites headers if it can get the request headers; 121 // Returns true and overwrites headers if it can get the request headers;
121 // otherwise, returns false and does not modify headers. 122 // otherwise, returns false and does not modify headers.
122 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0; 123 virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0;
123 124
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 176
176 // Resumes the transaction after being deferred. 177 // Resumes the transaction after being deferred.
177 virtual int ResumeNetworkStart() = 0; 178 virtual int ResumeNetworkStart() = 0;
178 179
179 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0; 180 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0;
180 }; 181 };
181 182
182 } // namespace net 183 } // namespace net
183 184
184 #endif // NET_HTTP_HTTP_TRANSACTION_H_ 185 #endif // NET_HTTP_HTTP_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698