Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: net/url_request/url_request_simple_job.h

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__
6 #define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__ 6 #define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H__
7 7
8 #include "net/url_request/url_request.h" 8 #include "net/url_request/url_request.h"
9 #include "net/url_request/url_request_job.h" 9 #include "net/url_request/url_request_job.h"
10 10
11 class URLRequestSimpleJob : public URLRequestJob { 11 class URLRequestSimpleJob : public URLRequestJob {
12 public: 12 public:
13 URLRequestSimpleJob(URLRequest* request); 13 URLRequestSimpleJob(URLRequest* request);
14 14
15 virtual void Start(); 15 virtual void Start();
16 virtual bool ReadRawData(char* buf, int buf_size, int *bytes_read); 16 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
17 virtual bool GetMimeType(std::string* mime_type); 17 virtual bool GetMimeType(std::string* mime_type);
18 virtual bool GetCharset(std::string* charset); 18 virtual bool GetCharset(std::string* charset);
19 19
20 protected: 20 protected:
21 // subclasses must override the way response data is determined. 21 // subclasses must override the way response data is determined.
22 virtual bool GetData(std::string* mime_type, 22 virtual bool GetData(std::string* mime_type,
23 std::string* charset, 23 std::string* charset,
24 std::string* data) const = 0; 24 std::string* data) const = 0;
25 25
26 private: 26 private:
27 void StartAsync(); 27 void StartAsync();
28 28
29 std::string mime_type_; 29 std::string mime_type_;
30 std::string charset_; 30 std::string charset_;
31 std::string data_; 31 std::string data_;
32 int data_offset_; 32 int data_offset_;
33 }; 33 };
34 34
35 #endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H__ 35 #endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H__
36 36
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698