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

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

Issue 5298008: net: Add namespace net to URLRequest and URLRequestJob classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some chromeos fixes 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) 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 #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 class URLRequest; 14 class URLRequest;
15 } // namespace net
14 16
15 class URLRequestSimpleJob : public URLRequestJob { 17 class URLRequestSimpleJob : public net::URLRequestJob {
16 public: 18 public:
17 explicit URLRequestSimpleJob(URLRequest* request); 19 explicit URLRequestSimpleJob(net::URLRequest* request);
18 20
19 virtual void Start(); 21 virtual void Start();
20 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); 22 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
21 virtual bool GetMimeType(std::string* mime_type) const; 23 virtual bool GetMimeType(std::string* mime_type) const;
22 virtual bool GetCharset(std::string* charset); 24 virtual bool GetCharset(std::string* charset);
23 25
24 protected: 26 protected:
25 ~URLRequestSimpleJob() {} 27 ~URLRequestSimpleJob() {}
26 28
27 // subclasses must override the way response data is determined. 29 // subclasses must override the way response data is determined.
28 virtual bool GetData(std::string* mime_type, 30 virtual bool GetData(std::string* mime_type,
29 std::string* charset, 31 std::string* charset,
30 std::string* data) const = 0; 32 std::string* data) const = 0;
31 33
32 protected: 34 protected:
33 void StartAsync(); 35 void StartAsync();
34 36
35 private: 37 private:
36 std::string mime_type_; 38 std::string mime_type_;
37 std::string charset_; 39 std::string charset_;
38 std::string data_; 40 std::string data_;
39 int data_offset_; 41 int data_offset_;
40 }; 42 };
41 43
42 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ 44 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698