Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_FAILING_HTTP_TRANSACTION_FACTORY_H_ | |
| 6 #define NET_FAILING_HTTP_TRANSACTION_FACTORY_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "net/base/completion_callback.h" | |
|
mmenke
2014/01/28 17:27:23
Not needed.
Randy Smith (Not in Mondays)
2014/01/28 22:52:59
Done.
| |
| 10 #include "net/base/net_errors.h" | |
| 11 #include "net/base/request_priority.h" | |
| 12 #include "net/http/http_transaction.h" | |
| 13 #include "net/http/http_transaction_factory.h" | |
| 14 | |
| 15 namespace net { | |
| 16 | |
| 17 class AuthCredentials; | |
| 18 class BoundNetLog; | |
| 19 class HttpCache; | |
| 20 class HttpRequestHeaders; | |
| 21 class IOBuffer; | |
| 22 class URLRequestContextGetter; | |
| 23 class X509Certificate; | |
| 24 | |
| 25 struct HttpRequestInfo; | |
|
mmenke
2014/01/28 17:27:23
Should probably add a forward declaration of HttpN
mmenke
2014/01/28 17:27:23
Of all these forward declarations, only HttpCache
Randy Smith (Not in Mondays)
2014/01/28 22:52:59
Done.
Randy Smith (Not in Mondays)
2014/01/28 22:52:59
Right, because the transaction declaration used to
| |
| 26 | |
| 27 // Creates transactions that always (asynchronously) return |err|. | |
| 28 // |err| must not be OK. | |
|
mmenke
2014/01/28 17:27:23
Think it's generally a bad idea to mention functio
Randy Smith (Not in Mondays)
2014/01/28 22:52:59
SGTM. Done.
| |
| 29 class NET_EXPORT FailingHttpTransactionFactory : public HttpTransactionFactory { | |
| 30 public: | |
| 31 // The caller must guarantee that |session| outlives this object. | |
| 32 FailingHttpTransactionFactory(HttpNetworkSession* session, Error error); | |
| 33 virtual ~FailingHttpTransactionFactory(); | |
| 34 | |
| 35 // HttpTransactionFactory: | |
| 36 virtual int CreateTransaction( | |
| 37 RequestPriority priority, | |
| 38 scoped_ptr<HttpTransaction>* trans) OVERRIDE; | |
| 39 virtual HttpCache* GetCache() OVERRIDE; | |
| 40 virtual HttpNetworkSession* GetSession() OVERRIDE; | |
|
mmenke
2014/01/28 17:27:23
include platform_specific for OVERRIDE.
Randy Smith (Not in Mondays)
2014/01/28 22:52:59
I think you meant compiler_specific.h, so I includ
mmenke
2014/01/28 23:10:22
Gah...compiler_specific was named platform_specifi
| |
| 41 | |
| 42 private: | |
| 43 HttpNetworkSession* session_; | |
| 44 Error error_; | |
| 45 }; | |
| 46 | |
| 47 } // namespace net | |
| 48 | |
| 49 #endif // NET_FAILING_HTTP_TRANSACTION_FACTORY_H_ | |
| OLD | NEW |