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

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

Issue 51004: Respect cookies set in a 401 responses when restarting the http transaction.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address rest of wtc's comments (had missed some in previous patchset) Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_transaction_unittest.h » ('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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // 48 //
49 // NOTE: The transaction is not responsible for deleting the callback object. 49 // NOTE: The transaction is not responsible for deleting the callback object.
50 // 50 //
51 virtual int RestartIgnoringLastError(CompletionCallback* callback) = 0; 51 virtual int RestartIgnoringLastError(CompletionCallback* callback) = 0;
52 52
53 // Restarts the HTTP transaction with authentication credentials. 53 // Restarts the HTTP transaction with authentication credentials.
54 virtual int RestartWithAuth(const std::wstring& username, 54 virtual int RestartWithAuth(const std::wstring& username,
55 const std::wstring& password, 55 const std::wstring& password,
56 CompletionCallback* callback) = 0; 56 CompletionCallback* callback) = 0;
57 57
58 // Returns true if auth is ready to be continued. Callers should check
59 // this value anytime Start() completes: if it is true, the transaction
60 // can be resumed with RestartWithAuth(L"", L"", callback) to resume
61 // the automatic auth exchange. This notification gives the caller a
62 // chance to process the response headers from all of the intermediate
63 // restarts needed for authentication.
64 virtual bool IsReadyToRestartForAuth() = 0;
65
58 // Once response info is available for the transaction, response data may be 66 // Once response info is available for the transaction, response data may be
59 // read by calling this method. 67 // read by calling this method.
60 // 68 //
61 // Response data is copied into the given buffer and the number of bytes 69 // Response data is copied into the given buffer and the number of bytes
62 // copied is returned. ERR_IO_PENDING is returned if response data is not 70 // copied is returned. ERR_IO_PENDING is returned if response data is not
63 // yet available. The CompletionCallback is notified when the data copy 71 // yet available. The CompletionCallback is notified when the data copy
64 // completes, and it is passed the number of bytes that were successfully 72 // completes, and it is passed the number of bytes that were successfully
65 // copied. Or, if a read error occurs, the CompletionCallback is notified of 73 // copied. Or, if a read error occurs, the CompletionCallback is notified of
66 // the error. Any other negative return value indicates that the transaction 74 // the error. Any other negative return value indicates that the transaction
67 // could not be read. 75 // could not be read.
(...skipping 13 matching lines...) Expand all
81 virtual LoadState GetLoadState() const = 0; 89 virtual LoadState GetLoadState() const = 0;
82 90
83 // Returns the upload progress in bytes. If there is no upload data, 91 // Returns the upload progress in bytes. If there is no upload data,
84 // zero will be returned. This does not include the request headers. 92 // zero will be returned. This does not include the request headers.
85 virtual uint64 GetUploadProgress() const = 0; 93 virtual uint64 GetUploadProgress() const = 0;
86 }; 94 };
87 95
88 } // namespace net 96 } // namespace net
89 97
90 #endif // NET_HTTP_HTTP_TRANSACTION_H_ 98 #endif // NET_HTTP_HTTP_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_transaction_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698