15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file.
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "net/http/failing_http_transaction_factory.h"
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/bind.h"
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/compiler_specific.h"
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/logging.h"
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/message_loop/message_loop.h"
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "net/base/load_timing_info.h"
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "net/base/upload_progress.h"
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace net {
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class AuthCredentials;
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class BoundNetLog;
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class HttpRequestHeaders;
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class IOBuffer;
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class X509Certificate;
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)struct HttpRequestInfo;
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace {
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// A simple class to interpose between the cache and network http layers.
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// These transactions can be generated by the FailingHttpTransactionFactory
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// to test interactions between cache and network.
295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class FailingHttpTransaction : public HttpTransaction {
305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public:
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  explicit FailingHttpTransaction(Error error);
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual ~FailingHttpTransaction();
335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // HttpTransaction
355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int Start(const HttpRequestInfo* request_info,
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                    const CompletionCallback& callback,
375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                    const BoundNetLog& net_log) OVERRIDE;
385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int RestartIgnoringLastError(
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const CompletionCallback& callback) OVERRIDE;
405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int RestartWithCertificate(
415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      X509Certificate* client_cert,
425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const CompletionCallback& callback) OVERRIDE;
435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int RestartWithAuth(
445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const AuthCredentials& credentials,
455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const CompletionCallback& callback) OVERRIDE;
465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual bool IsReadyToRestartForAuth() OVERRIDE;
475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int Read(IOBuffer* buf, int buf_len,
485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                   const CompletionCallback& callback) OVERRIDE;
495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void StopCaching() OVERRIDE;
505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual bool GetFullRequestHeaders(
515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      HttpRequestHeaders* headers) const OVERRIDE;
525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int64 GetTotalReceivedBytes() const OVERRIDE;
535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void DoneReading() OVERRIDE;
545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE;
555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual LoadState GetLoadState() const OVERRIDE;
565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual UploadProgress GetUploadProgress() const OVERRIDE;
575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void SetQuicServerInfo(
585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      net::QuicServerInfo* quic_server_info) OVERRIDE;
595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual bool GetLoadTimingInfo(
605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      LoadTimingInfo* load_timing_info) const OVERRIDE;
615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void SetPriority(RequestPriority priority) OVERRIDE;
625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void SetWebSocketHandshakeStreamCreateHelper(
635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE;
645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual void SetBeforeNetworkStartCallback(
655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const BeforeNetworkStartCallback& callback) OVERRIDE;
66116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch  virtual void SetBeforeProxyHeadersSentCallback(
67116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch      const BeforeProxyHeadersSentCallback& callback) OVERRIDE;
685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual int ResumeNetworkStart() OVERRIDE;
695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private:
715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  Error error_;
725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)};
735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)FailingHttpTransaction::FailingHttpTransaction(Error error) : error_(error) {
755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  DCHECK_LT(error, OK);
765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)FailingHttpTransaction::~FailingHttpTransaction() {}
795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::Start(const HttpRequestInfo* request_info,
815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                                  const CompletionCallback& callback,
825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                                  const BoundNetLog& net_log)  {
835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  base::MessageLoop::current()->PostTask(
845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      FROM_HERE, base::Bind(callback, error_));
855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_IO_PENDING;
865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::RestartIgnoringLastError(
895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const CompletionCallback& callback)  {
905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_FAILED;
915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::RestartWithCertificate(
945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    X509Certificate* client_cert,
955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const CompletionCallback& callback)  {
965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_FAILED;
975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::RestartWithAuth(
1005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const AuthCredentials& credentials,
1015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const CompletionCallback& callback)  {
1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_FAILED;
1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool FailingHttpTransaction::IsReadyToRestartForAuth()  {
1065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
1075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::Read(IOBuffer* buf, int buf_len,
1105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                                 const CompletionCallback& callback)  {
1115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_FAILED;
1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::StopCaching()  {}
1165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool FailingHttpTransaction::GetFullRequestHeaders(
1185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    HttpRequestHeaders* headers) const  {
1195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
1205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int64 FailingHttpTransaction::GetTotalReceivedBytes() const  {
1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return 0;
1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::DoneReading()  {
1275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)const HttpResponseInfo* FailingHttpTransaction::GetResponseInfo() const  {
1315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return NULL;
1325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)LoadState FailingHttpTransaction::GetLoadState() const  {
1355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return LOAD_STATE_IDLE;
1365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)UploadProgress FailingHttpTransaction::GetUploadProgress() const  {
1395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return UploadProgress();
1405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::SetQuicServerInfo(
1435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    net::QuicServerInfo* quic_server_info) {}
1445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool FailingHttpTransaction::GetLoadTimingInfo(
1465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    LoadTimingInfo* load_timing_info) const  {
1475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
1485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::SetPriority(RequestPriority priority)  {}
1515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::SetWebSocketHandshakeStreamCreateHelper(
1535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    WebSocketHandshakeStreamBase::CreateHelper* create_helper)  {
1545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void FailingHttpTransaction::SetBeforeNetworkStartCallback(
1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const BeforeNetworkStartCallback& callback)  {
1595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
161116680a4aac90f2aa7413d9095a592090648e557Ben Murdochvoid FailingHttpTransaction::SetBeforeProxyHeadersSentCallback(
162116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    const BeforeProxyHeadersSentCallback& callback)  {
163116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch}
164116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch
1655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransaction::ResumeNetworkStart()  {
1665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return ERR_FAILED;
1685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}  // namespace
1715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)FailingHttpTransactionFactory::FailingHttpTransactionFactory(
1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    HttpNetworkSession* session,
1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    Error error) : session_(session), error_(error) {
1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  DCHECK_LT(error, OK);
1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)FailingHttpTransactionFactory::~FailingHttpTransactionFactory() {}
1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// HttpTransactionFactory:
1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)int FailingHttpTransactionFactory::CreateTransaction(
1825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    RequestPriority priority,
1835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    scoped_ptr<HttpTransaction>* trans) {
1845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  trans->reset(new FailingHttpTransaction(error_));
1855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return OK;
1865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)HttpCache* FailingHttpTransactionFactory::GetCache() {
1895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return NULL;
1905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)HttpNetworkSession* FailingHttpTransactionFactory::GetSession() {
1935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return session_;
1945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}  // namespace net
1975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
198