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

Side by Side Diff: content/test/net/url_request_abort_on_end_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
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 // This class simulates what wininet does when a dns lookup fails. 4 // This class simulates what wininet does when a dns lookup fails.
5 5
6 #ifndef CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_ 6 #ifndef CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_
7 #define CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_ 7 #define CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 static const char k400AbortOnEndUrl[]; 23 static const char k400AbortOnEndUrl[];
24 24
25 URLRequestAbortOnEndJob(net::URLRequest* request, 25 URLRequestAbortOnEndJob(net::URLRequest* request,
26 net::NetworkDelegate* network_delegate); 26 net::NetworkDelegate* network_delegate);
27 27
28 // net::URLRequestJob 28 // net::URLRequestJob
29 void Start() override; 29 void Start() override;
30 bool GetMimeType(std::string* mime_type) const override; 30 bool GetMimeType(std::string* mime_type) const override;
31 void GetResponseInfo(net::HttpResponseInfo* info) override; 31 void GetResponseInfo(net::HttpResponseInfo* info) override;
32 bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; 32 int ReadRawData(net::IOBuffer* buf, int buf_size) override;
33 33
34 static void AddUrlHandler(); 34 static void AddUrlHandler();
35 35
36 private: 36 private:
37 ~URLRequestAbortOnEndJob() override; 37 ~URLRequestAbortOnEndJob() override;
38 38
39 void GetResponseInfoConst(net::HttpResponseInfo* info) const; 39 void GetResponseInfoConst(net::HttpResponseInfo* info) const;
40 void StartAsync(); 40 void StartAsync();
41 41
42 bool sent_data_; 42 bool sent_data_;
43 43
44 base::WeakPtrFactory<URLRequestAbortOnEndJob> weak_factory_; 44 base::WeakPtrFactory<URLRequestAbortOnEndJob> weak_factory_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(URLRequestAbortOnEndJob); 46 DISALLOW_COPY_AND_ASSIGN(URLRequestAbortOnEndJob);
47 }; 47 };
48 48
49 } // namespace content 49 } // namespace content
50 50
51 #endif // CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_ 51 #endif // CONTENT_TEST_NET_URL_REQUEST_ABORT_ON_END_JOB_H_
OLDNEW
« no previous file with comments | « content/browser/webui/url_data_manager_backend.cc ('k') | content/test/net/url_request_abort_on_end_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698