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

Side by Side Diff: content/browser/loader/mock_resource_loader.h

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)
Patch Set: Response to comments Created 3 years, 9 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_
6 #define CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_ 6 #define CONTENT_BROWSER_LOADER_MOCK_RESOURCE_LOADER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 ResourceHandler* const resource_handler_; 97 ResourceHandler* const resource_handler_;
98 98
99 Status status_ = Status::IDLE; 99 Status status_ = Status::IDLE;
100 int error_code_ = net::OK; 100 int error_code_ = net::OK;
101 bool canceled_out_of_band_ = false; 101 bool canceled_out_of_band_ = false;
102 102
103 scoped_refptr<net::IOBuffer> io_buffer_; 103 scoped_refptr<net::IOBuffer> io_buffer_;
104 int io_buffer_size_ = 0; 104 int io_buffer_size_ = 0;
105 105
106 // True if waiting to receive a buffer due to an OnWillRead call. This does
107 // not affect behavior; it's only used for DCHECKing.
108 bool waiting_on_buffer_ = false;
109
106 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; 110 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_;
107 111
108 base::WeakPtrFactory<MockResourceLoader> weak_factory_; 112 base::WeakPtrFactory<MockResourceLoader> weak_factory_;
109 113
110 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); 114 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader);
111 }; 115 };
112 116
113 } // namespace content 117 } // namespace content
114 118
115 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ 119 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/mime_sniffing_resource_handler_unittest.cc ('k') | content/browser/loader/mock_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698