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

Side by Side Diff: net/http/http_transaction_unittest.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_transaction.h ('k') | net/http/http_util.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_UNITTEST_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
7 7
8 #include "net/http/http_transaction.h" 8 #include "net/http/http_transaction.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 virtual int RestartIgnoringLastError(net::CompletionCallback* callback) { 233 virtual int RestartIgnoringLastError(net::CompletionCallback* callback) {
234 return net::ERR_FAILED; 234 return net::ERR_FAILED;
235 } 235 }
236 236
237 virtual int RestartWithAuth(const std::wstring& username, 237 virtual int RestartWithAuth(const std::wstring& username,
238 const std::wstring& password, 238 const std::wstring& password,
239 net::CompletionCallback* callback) { 239 net::CompletionCallback* callback) {
240 return net::ERR_FAILED; 240 return net::ERR_FAILED;
241 } 241 }
242 242
243 virtual bool IsReadyToRestartForAuth() {
244 return false;
245 }
246
243 virtual int Read(net::IOBuffer* buf, int buf_len, 247 virtual int Read(net::IOBuffer* buf, int buf_len,
244 net::CompletionCallback* callback) { 248 net::CompletionCallback* callback) {
245 int data_len = static_cast<int>(data_.size()); 249 int data_len = static_cast<int>(data_.size());
246 int num = std::min(buf_len, data_len - data_cursor_); 250 int num = std::min(buf_len, data_len - data_cursor_);
247 if (num) { 251 if (num) {
248 memcpy(buf->data(), data_.data() + data_cursor_, num); 252 memcpy(buf->data(), data_.data() + data_cursor_, num);
249 data_cursor_ += num; 253 data_cursor_ += num;
250 } 254 }
251 if (test_mode_ & TEST_MODE_SYNC_NET_READ) 255 if (test_mode_ & TEST_MODE_SYNC_NET_READ)
252 return num; 256 return num;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 }; 311 };
308 312
309 313
310 //----------------------------------------------------------------------------- 314 //-----------------------------------------------------------------------------
311 // helpers 315 // helpers
312 316
313 // read the transaction completely 317 // read the transaction completely
314 int ReadTransaction(net::HttpTransaction* trans, std::string* result); 318 int ReadTransaction(net::HttpTransaction* trans, std::string* result);
315 319
316 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 320 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/http/http_transaction.h ('k') | net/http/http_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698