Revert 162240 - See also:
[chromium-blink-merge.git] / net / url_request / url_request_error_job.h
blob7c162f0c493597333e2f451f31b668e8806607cf
1 // Copyright (c) 2011 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 // Invalid URLs go through this URLRequestJob class rather than being
6 // passed to the default job handler.
8 #ifndef NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_
9 #define NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_
11 #include "base/memory/weak_ptr.h"
12 #include "net/base/net_export.h"
13 #include "net/url_request/url_request_job.h"
15 namespace net {
17 class NET_EXPORT URLRequestErrorJob : public URLRequestJob {
18 public:
19 URLRequestErrorJob(URLRequest* request,
20 NetworkDelegate* network_delegate,
21 int error);
23 virtual void Start() OVERRIDE;
25 private:
26 virtual ~URLRequestErrorJob();
28 void StartAsync();
30 int error_;
32 base::WeakPtrFactory<URLRequestErrorJob> weak_factory_;
35 } // namespace net
37 #endif // NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_