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

Side by Side Diff: content/browser/fileapi/mock_url_request_delegate.h

Issue 2368913003: Populate storage_unittests target. (Closed)
Patch Set: Removed unnecessary include from storage/browser/blob/blob_storage_context_unittest.cc. Created 4 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_FILEAPI_MOCK_URL_REQUEST_DELEGATE_H_
6 #define CONTENT_BROWSER_FILEAPI_MOCK_URL_REQUEST_DELEGATE_H_
7
8 #include "net/base/io_buffer.h"
9 #include "net/url_request/url_request.h"
10
11 namespace net {
12 class IOBuffer;
13 }
14
15 namespace content {
16
17 // A URL request delegate that receives the response body.
18 class MockURLRequestDelegate : public net::URLRequest::Delegate {
19 public:
20 MockURLRequestDelegate();
21 ~MockURLRequestDelegate() override;
22
23 void OnResponseStarted(net::URLRequest* request) override;
24 void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
25 const std::string& response_data() const { return response_data_; }
26 const net::IOBufferWithSize* metadata() const { return metadata_.get(); }
27
28 private:
29 void ReadSome(net::URLRequest* request);
30 void ReceiveData(net::URLRequest* request, int bytes_read);
31 void RequestComplete();
32
33 scoped_refptr<net::IOBuffer> io_buffer_;
34 std::string response_data_;
35 scoped_refptr<net::IOBufferWithSize> metadata_;
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_BROWSER_FILEAPI_MOCK_URL_REQUEST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/fileapi/mock_file_update_observer.cc ('k') | content/browser/fileapi/mock_url_request_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698