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

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

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "net/base/completion_callback.h" 11 #include "net/base/completion_callback.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 #include "net/url_request/url_range_request_job.h" 13 #include "net/url_request/url_range_request_job.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class URLRequest; 17 class URLRequest;
18 18
19 class NET_EXPORT URLRequestSimpleJob : public URLRangeRequestJob { 19 class NET_EXPORT URLRequestSimpleJob : public URLRangeRequestJob {
20 public: 20 public:
21 URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate); 21 URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate);
22 22
23 virtual void Start() override; 23 void Start() override;
24 virtual bool ReadRawData(IOBuffer* buf, 24 bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
25 int buf_size, 25 bool GetMimeType(std::string* mime_type) const override;
26 int *bytes_read) override; 26 bool GetCharset(std::string* charset) override;
27 virtual bool GetMimeType(std::string* mime_type) const override;
28 virtual bool GetCharset(std::string* charset) override;
29 27
30 protected: 28 protected:
31 virtual ~URLRequestSimpleJob(); 29 ~URLRequestSimpleJob() override;
32 30
33 // Subclasses must override the way response data is determined. 31 // Subclasses must override the way response data is determined.
34 // The return value should be: 32 // The return value should be:
35 // - OK if data is obtained; 33 // - OK if data is obtained;
36 // - ERR_IO_PENDING if async processing is needed to finish obtaining data. 34 // - ERR_IO_PENDING if async processing is needed to finish obtaining data.
37 // This is the only case when |callback| should be called after 35 // This is the only case when |callback| should be called after
38 // completion of the operation. In other situations |callback| should 36 // completion of the operation. In other situations |callback| should
39 // never be called; 37 // never be called;
40 // - any other ERR_* code to indicate an error. This code will be used 38 // - any other ERR_* code to indicate an error. This code will be used
41 // as the error code in the URLRequestStatus when the URLRequest 39 // as the error code in the URLRequestStatus when the URLRequest
(...skipping 13 matching lines...) Expand all
55 std::string mime_type_; 53 std::string mime_type_;
56 std::string charset_; 54 std::string charset_;
57 std::string data_; 55 std::string data_;
58 int data_offset_; 56 int data_offset_;
59 base::WeakPtrFactory<URLRequestSimpleJob> weak_factory_; 57 base::WeakPtrFactory<URLRequestSimpleJob> weak_factory_;
60 }; 58 };
61 59
62 } // namespace net 60 } // namespace net
63 61
64 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ 62 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_redirect_job.h ('k') | net/url_request/url_request_simple_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698