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

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

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)
Patch Set: Fix merge (x2) 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.
107 bool waiting_on_buffer_ = false;
Charlie Harrison 2017/03/08 21:12:46 Optional: Maybe add a note that this bool doesn't
mmenke 2017/03/08 22:51:30 Done.
108
106 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_; 109 std::unique_ptr<base::RunLoop> canceled_or_idle_run_loop_;
107 110
108 base::WeakPtrFactory<MockResourceLoader> weak_factory_; 111 base::WeakPtrFactory<MockResourceLoader> weak_factory_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader); 113 DISALLOW_COPY_AND_ASSIGN(MockResourceLoader);
111 }; 114 };
112 115
113 } // namespace content 116 } // namespace content
114 117
115 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_ 118 #endif // CONTENT_BROWSER_LOADER_TEST_RESOURCE_HANDLER_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698