Chromium Code Reviews| Index: content/browser/net/url_request_abort_on_end_job.h |
| diff --git a/content/browser/net/url_request_abort_on_end_job.h b/content/browser/net/url_request_abort_on_end_job.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2ed1a4c0527f7a1c23d40a028e7336017560b313 |
| --- /dev/null |
| +++ b/content/browser/net/url_request_abort_on_end_job.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// This class simulates what wininet does when a dns lookup fails. |
| + |
| +#ifndef CONTENT_BROWSER_NET_URL_REQUEST_ABORT_ON_END_JOB_H_ |
| +#define CONTENT_BROWSER_NET_URL_REQUEST_ABORT_ON_END_JOB_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +#include "content/common/content_export.h" |
| +#include "net/url_request/url_request_job.h" |
| + |
| +class URLRequestAbortOnEndJob : public net::URLRequestJob { |
| + public: |
| + static const char k400AbortOnEndUrl[]; |
| + |
| + // net::URLRequestJob |
| + virtual void Start(); |
|
Paweł Hajdan Jr.
2011/10/27 08:52:58
nit: OVERRIDE on those please (base/compiler_speci
gavinp
2011/10/27 12:52:53
Done.
|
| + virtual bool GetMimeType(std::string* mime_type) const; |
| + virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| + virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); |
| + |
| + static net::URLRequestJob* Factory(net::URLRequest* request, |
| + const std::string& scheme); |
| + |
| + CONTENT_EXPORT static void AddUrlHandler(); |
| + |
| + private: |
| + explicit URLRequestAbortOnEndJob(net::URLRequest* request); |
| + virtual ~URLRequestAbortOnEndJob(); |
| + |
| + void GetResponseInfoConst(net::HttpResponseInfo* info) const; |
| + void StartAsync(); |
| + |
| + bool sent_data_; |
| + |
| + ScopedRunnableMethodFactory<URLRequestAbortOnEndJob> method_factory_; |
| +}; |
|
Paweł Hajdan Jr.
2011/10/27 08:52:58
And DISALLOW_COPY_AND_ASSIGN.
gavinp
2011/10/27 12:52:53
Done.
|
| +#endif |
| + |