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

Side by Side Diff: chrome/common/net/url_request_intercept_job.h

Issue 18390: Change URLRequest to use a ref-counted buffer for actual IO.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « chrome/common/chrome_plugin_unittest.cc ('k') | chrome/common/net/url_request_intercept_job.cc » ('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) 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 CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ 5 #ifndef CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ 6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "net/url_request/url_request.h" 9 #include "net/url_request/url_request.h"
10 #include "net/url_request/url_request_job.h" 10 #include "net/url_request/url_request_job.h"
(...skipping 16 matching lines...) Expand all
27 ScopableCPRequest* cprequest); 27 ScopableCPRequest* cprequest);
28 virtual ~URLRequestInterceptJob(); 28 virtual ~URLRequestInterceptJob();
29 29
30 // Plugin callbacks. 30 // Plugin callbacks.
31 void OnStartCompleted(int result); 31 void OnStartCompleted(int result);
32 void OnReadCompleted(int bytes_read); 32 void OnReadCompleted(int bytes_read);
33 33
34 // URLRequestJob 34 // URLRequestJob
35 virtual void Start(); 35 virtual void Start();
36 virtual void Kill(); 36 virtual void Kill();
37 virtual bool ReadRawData(char* buf, int buf_size, int* bytes_read); 37 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read);
38 virtual bool GetMimeType(std::string* mime_type); 38 virtual bool GetMimeType(std::string* mime_type);
39 virtual bool GetCharset(std::string* charset); 39 virtual bool GetCharset(std::string* charset);
40 virtual void GetResponseInfo(net::HttpResponseInfo* info); 40 virtual void GetResponseInfo(net::HttpResponseInfo* info);
41 virtual int GetResponseCode(); 41 virtual int GetResponseCode();
42 virtual bool GetContentEncoding(std::string* encoding_type); 42 virtual bool GetContentEncoding(std::string* encoding_type);
43 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); 43 virtual bool IsRedirectResponse(GURL* location, int* http_status_code);
44 44
45 // NotificationObserver 45 // NotificationObserver
46 virtual void Observe(NotificationType type, 46 virtual void Observe(NotificationType type,
47 const NotificationSource& source, 47 const NotificationSource& source,
48 const NotificationDetails& details); 48 const NotificationDetails& details);
49 private: 49 private:
50 void StartAsync(); 50 void StartAsync();
51 void DetachPlugin(); 51 void DetachPlugin();
52 52
53 scoped_ptr<ScopableCPRequest> cprequest_; 53 scoped_ptr<ScopableCPRequest> cprequest_;
54 ChromePluginLib* plugin_; 54 ChromePluginLib* plugin_;
55 bool got_headers_; 55 bool got_headers_;
56 char* read_buffer_; 56 net::IOBuffer* read_buffer_;
57 int read_buffer_size_; 57 int read_buffer_size_;
58 58
59 DISALLOW_EVIL_CONSTRUCTORS(URLRequestInterceptJob); 59 DISALLOW_EVIL_CONSTRUCTORS(URLRequestInterceptJob);
60 }; 60 };
61 61
62 62
63 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__ 63 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H__
64 64
OLDNEW
« no previous file with comments | « chrome/common/chrome_plugin_unittest.cc ('k') | chrome/common/net/url_request_intercept_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698