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

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

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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_error_job.h ('k') | printing/printing_context_cairo.h » ('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) 2011 The Chromium Authors. All rights reserved. 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 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "net/url_request/url_request_job.h" 12 #include "net/url_request/url_request_job.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class URLRequest; 16 class URLRequest;
17 17
18 class URLRequestSimpleJob : public URLRequestJob { 18 class URLRequestSimpleJob : public URLRequestJob {
19 public: 19 public:
20 explicit URLRequestSimpleJob(URLRequest* request); 20 explicit URLRequestSimpleJob(URLRequest* request);
21 21
22 virtual void Start(); 22 virtual void Start();
23 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read); 23 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read);
24 virtual bool GetMimeType(std::string* mime_type) const; 24 virtual bool GetMimeType(std::string* mime_type) const;
25 virtual bool GetCharset(std::string* charset); 25 virtual bool GetCharset(std::string* charset);
26 26
27 protected: 27 protected:
28 ~URLRequestSimpleJob(); 28 virtual ~URLRequestSimpleJob();
29 29
30 // subclasses must override the way response data is determined. 30 // subclasses must override the way response data is determined.
31 virtual bool GetData(std::string* mime_type, 31 virtual bool GetData(std::string* mime_type,
32 std::string* charset, 32 std::string* charset,
33 std::string* data) const = 0; 33 std::string* data) const = 0;
34 34
35 protected: 35 protected:
36 void StartAsync(); 36 void StartAsync();
37 37
38 private: 38 private:
39 std::string mime_type_; 39 std::string mime_type_;
40 std::string charset_; 40 std::string charset_;
41 std::string data_; 41 std::string data_;
42 int data_offset_; 42 int data_offset_;
43 ScopedRunnableMethodFactory<URLRequestSimpleJob> method_factory_; 43 ScopedRunnableMethodFactory<URLRequestSimpleJob> method_factory_;
44 }; 44 };
45 45
46 } // namespace net 46 } // namespace net
47 47
48 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ 48 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_error_job.h ('k') | printing/printing_context_cairo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698