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

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

Issue 10933022: Revert 153131 (Histograms showed it doesn't help much) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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_cache_unittest.cc ('k') | net/http/http_transaction_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 10 #include <string>
(...skipping 30 matching lines...) Expand all
41 TEST_MODE_SYNC_CACHE_START | TEST_MODE_SYNC_CACHE_READ | 41 TEST_MODE_SYNC_CACHE_START | TEST_MODE_SYNC_CACHE_READ |
42 TEST_MODE_SYNC_CACHE_WRITE) 42 TEST_MODE_SYNC_CACHE_WRITE)
43 }; 43 };
44 44
45 typedef void (*MockTransactionHandler)(const net::HttpRequestInfo* request, 45 typedef void (*MockTransactionHandler)(const net::HttpRequestInfo* request,
46 std::string* response_status, 46 std::string* response_status,
47 std::string* response_headers, 47 std::string* response_headers,
48 std::string* response_data); 48 std::string* response_data);
49 49
50 struct MockTransaction { 50 struct MockTransaction {
51 // Net error code returned as a result of starting the transaction. If not
52 // net::OK, all response-related fields will be ignored. Must not be
53 // ERR_IO_PENDING.
54 net::Error start_result;
55
56 const char* url; 51 const char* url;
57 const char* method; 52 const char* method;
58 // If |request_time| is unspecified, the current time will be used. 53 // If |request_time| is unspecified, the current time will be used.
59 base::Time request_time; 54 base::Time request_time;
60 const char* request_headers; 55 const char* request_headers;
61 int load_flags; 56 int load_flags;
62 const char* status; 57 const char* status;
63 const char* response_headers; 58 const char* response_headers;
64 // If |response_time| is unspecified, the current time will be used. 59 // If |response_time| is unspecified, the current time will be used.
65 base::Time response_time; 60 base::Time response_time;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 bool done_reading_called_; 220 bool done_reading_called_;
226 }; 221 };
227 222
228 //----------------------------------------------------------------------------- 223 //-----------------------------------------------------------------------------
229 // helpers 224 // helpers
230 225
231 // read the transaction completely 226 // read the transaction completely
232 int ReadTransaction(net::HttpTransaction* trans, std::string* result); 227 int ReadTransaction(net::HttpTransaction* trans, std::string* result);
233 228
234 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 229 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698