Chromium Code Reviews

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

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 <string> 8 #include <string>
9 9
10 #include "net/url_request/url_request_job.h" 10 #include "net/url_request/url_request_job.h"
11 11
12 class URLRequest; 12 class URLRequest;
13 13
14 class URLRequestSimpleJob : public URLRequestJob { 14 class URLRequestSimpleJob : public URLRequestJob {
15 public: 15 public:
16 explicit URLRequestSimpleJob(URLRequest* request); 16 explicit URLRequestSimpleJob(URLRequest* request);
17 17
18 virtual void Start(); 18 virtual void Start();
19 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); 19 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
20 virtual bool GetMimeType(std::string* mime_type) const; 20 virtual bool GetMimeType(std::string* mime_type) const;
21 virtual bool GetCharset(std::string* charset); 21 virtual bool GetCharset(std::string* charset);
22 22
23 protected: 23 protected:
24 ~URLRequestSimpleJob() {}
25
24 // subclasses must override the way response data is determined. 26 // subclasses must override the way response data is determined.
25 virtual bool GetData(std::string* mime_type, 27 virtual bool GetData(std::string* mime_type,
26 std::string* charset, 28 std::string* charset,
27 std::string* data) const = 0; 29 std::string* data) const = 0;
28 30
29 private: 31 private:
30 void StartAsync(); 32 void StartAsync();
31 33
32 std::string mime_type_; 34 std::string mime_type_;
33 std::string charset_; 35 std::string charset_;
34 std::string data_; 36 std::string data_;
35 int data_offset_; 37 int data_offset_;
36 }; 38 };
37 39
38 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ 40 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
OLDNEW

Powered by Google App Engine