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

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

Issue 12310075: Cache failover to LOAD_PREFERRING_CACHE if network response suggests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed vestigial reference to new content flag. Created 7 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const char* request_headers; 55 const char* request_headers;
56 int load_flags; 56 int load_flags;
57 const char* status; 57 const char* status;
58 const char* response_headers; 58 const char* response_headers;
59 // If |response_time| is unspecified, the current time will be used. 59 // If |response_time| is unspecified, the current time will be used.
60 base::Time response_time; 60 base::Time response_time;
61 const char* data; 61 const char* data;
62 int test_mode; 62 int test_mode;
63 MockTransactionHandler handler; 63 MockTransactionHandler handler;
64 net::CertStatus cert_status; 64 net::CertStatus cert_status;
65 net::Error error_return;
rvargas (doing something else) 2013/03/05 02:58:19 nit: return_code ? Maybe with a comment saying tha
Randy Smith (Not in Mondays) 2013/03/05 23:16:14 Done.
65 }; 66 };
66 67
67 extern const MockTransaction kSimpleGET_Transaction; 68 extern const MockTransaction kSimpleGET_Transaction;
68 extern const MockTransaction kSimplePOST_Transaction; 69 extern const MockTransaction kSimplePOST_Transaction;
69 extern const MockTransaction kTypicalGET_Transaction; 70 extern const MockTransaction kTypicalGET_Transaction;
70 extern const MockTransaction kETagGET_Transaction; 71 extern const MockTransaction kETagGET_Transaction;
71 extern const MockTransaction kRangeGET_Transaction; 72 extern const MockTransaction kRangeGET_Transaction;
72 73
73 // returns the mock transaction for the given URL 74 // returns the mock transaction for the given URL
74 const MockTransaction* FindMockTransaction(const GURL& url); 75 const MockTransaction* FindMockTransaction(const GURL& url);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 bool done_reading_called_; 224 bool done_reading_called_;
224 }; 225 };
225 226
226 //----------------------------------------------------------------------------- 227 //-----------------------------------------------------------------------------
227 // helpers 228 // helpers
228 229
229 // read the transaction completely 230 // read the transaction completely
230 int ReadTransaction(net::HttpTransaction* trans, std::string* result); 231 int ReadTransaction(net::HttpTransaction* trans, std::string* result);
231 232
232 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 233 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698