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

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

Issue 1439953006: Reland: URLRequestJob: change ReadRawData contract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address David's comment Created 5 years, 1 month 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
« no previous file with comments | « net/url_request/url_request_status.cc ('k') | net/url_request/url_request_test_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) 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_TEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_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"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 RequestPriority priority() const { return priority_; } 105 RequestPriority priority() const { return priority_; }
106 106
107 // Create a protocol handler for callers that don't subclass. 107 // Create a protocol handler for callers that don't subclass.
108 static scoped_ptr<URLRequestJobFactory::ProtocolHandler> 108 static scoped_ptr<URLRequestJobFactory::ProtocolHandler>
109 CreateProtocolHandler(); 109 CreateProtocolHandler();
110 110
111 // Job functions 111 // Job functions
112 void SetPriority(RequestPriority priority) override; 112 void SetPriority(RequestPriority priority) override;
113 void Start() override; 113 void Start() override;
114 bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override; 114 int ReadRawData(IOBuffer* buf, int buf_size) override;
115 void Kill() override; 115 void Kill() override;
116 bool GetMimeType(std::string* mime_type) const override; 116 bool GetMimeType(std::string* mime_type) const override;
117 void GetResponseInfo(HttpResponseInfo* info) override; 117 void GetResponseInfo(HttpResponseInfo* info) override;
118 void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 118 void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
119 int GetResponseCode() const override; 119 int GetResponseCode() const override;
120 bool IsRedirectResponse(GURL* location, int* http_status_code) override; 120 bool IsRedirectResponse(GURL* location, int* http_status_code) override;
121 121
122 protected: 122 protected:
123 // Override to specify whether the next read done from this job will 123 // Override to specify whether the next read done from this job will
124 // return IO pending. This controls whether or not the WAITING state will 124 // return IO pending. This controls whether or not the WAITING state will
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 int async_buf_size_; 164 int async_buf_size_;
165 165
166 LoadTimingInfo load_timing_info_; 166 LoadTimingInfo load_timing_info_;
167 167
168 base::WeakPtrFactory<URLRequestTestJob> weak_factory_; 168 base::WeakPtrFactory<URLRequestTestJob> weak_factory_;
169 }; 169 };
170 170
171 } // namespace net 171 } // namespace net
172 172
173 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 173 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_status.cc ('k') | net/url_request/url_request_test_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698