1 // Copyright (c) 2012 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.
5 #ifndef NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_
10 #include "net/url_request/url_request.h"
11 #include "net/url_request/url_request_simple_job.h"
17 class HttpResponseHeaders
;
20 class NET_EXPORT URLRequestDataJob
: public URLRequestSimpleJob
{
22 // Extracts info from a data scheme URL. Returns OK if successful. Returns
23 // ERR_INVALID_URL otherwise.
24 static int BuildResponse(const GURL
& url
,
25 std::string
* mime_type
,
28 HttpResponseHeaders
* headers
);
30 URLRequestDataJob(URLRequest
* request
, NetworkDelegate
* network_delegate
);
32 // URLRequestSimpleJob
33 int GetData(std::string
* mime_type
,
36 const CompletionCallback
& callback
) const override
;
39 ~URLRequestDataJob() override
;
41 DISALLOW_COPY_AND_ASSIGN(URLRequestDataJob
);
46 #endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_