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

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

Issue 5847001: net: Add namespace net to URLRequestSimpleJob. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/url_request/url_request_job.h" 11 #include "net/url_request/url_request_job.h"
12 12
13 namespace net { 13 namespace net {
14
14 class URLRequest; 15 class URLRequest;
15 } // namespace net
16 16
17 class URLRequestSimpleJob : public net::URLRequestJob { 17 class URLRequestSimpleJob : public URLRequestJob {
18 public: 18 public:
19 explicit URLRequestSimpleJob(net::URLRequest* request); 19 explicit URLRequestSimpleJob(URLRequest* request);
20 20
21 virtual void Start(); 21 virtual void Start();
22 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); 22 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read);
23 virtual bool GetMimeType(std::string* mime_type) const; 23 virtual bool GetMimeType(std::string* mime_type) const;
24 virtual bool GetCharset(std::string* charset); 24 virtual bool GetCharset(std::string* charset);
25 25
26 protected: 26 protected:
27 ~URLRequestSimpleJob() {} 27 ~URLRequestSimpleJob() {}
28 28
29 // subclasses must override the way response data is determined. 29 // subclasses must override the way response data is determined.
30 virtual bool GetData(std::string* mime_type, 30 virtual bool GetData(std::string* mime_type,
31 std::string* charset, 31 std::string* charset,
32 std::string* data) const = 0; 32 std::string* data) const = 0;
33 33
34 protected: 34 protected:
35 void StartAsync(); 35 void StartAsync();
36 36
37 private: 37 private:
38 std::string mime_type_; 38 std::string mime_type_;
39 std::string charset_; 39 std::string charset_;
40 std::string data_; 40 std::string data_;
41 int data_offset_; 41 int data_offset_;
42 }; 42 };
43 43
44 } // namespace net
45
44 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ 46 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols.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