• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
7 
8 #ifndef NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_
9 #define NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_
10 #pragma once
11 
12 #include "base/task.h"
13 #include "net/url_request/url_request_job.h"
14 
15 namespace net {
16 
17 class URLRequestErrorJob : public URLRequestJob {
18  public:
19   URLRequestErrorJob(URLRequest* request, int error);
20 
21   virtual void Start();
22 
23  private:
24   ~URLRequestErrorJob();
25 
26   void StartAsync();
27 
28   int error_;
29 
30   ScopedRunnableMethodFactory<URLRequestErrorJob> method_factory_;
31 };
32 
33 }  // namespace net
34 
35 #endif  // NET_URL_REQUEST_URL_REQUEST_ERROR_JOB_H_
36