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

Side by Side Diff: content/browser/loader/navigation_resource_handler.cc

Issue 2660723002: ResourceHandler::OnWillStart: Remove min_size argument. (Closed)
Patch Set: Merge Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 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 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 #include "content/browser/loader/navigation_resource_handler.h" 5 #include "content/browser/loader/navigation_resource_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 void NavigationResourceHandler::OnWillStart( 150 void NavigationResourceHandler::OnWillStart(
151 const GURL& url, 151 const GURL& url,
152 std::unique_ptr<ResourceController> controller) { 152 std::unique_ptr<ResourceController> controller) {
153 DCHECK(!has_controller()); 153 DCHECK(!has_controller());
154 controller->Resume(); 154 controller->Resume();
155 } 155 }
156 156
157 bool NavigationResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, 157 bool NavigationResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
158 int* buf_size, 158 int* buf_size) {
159 int min_size) {
160 DCHECK(!has_controller()); 159 DCHECK(!has_controller());
161 writer_.OnWillRead(buf, buf_size, min_size); 160 writer_.OnWillRead(buf, buf_size, -1);
162 return true; 161 return true;
163 } 162 }
164 163
165 void NavigationResourceHandler::OnReadCompleted( 164 void NavigationResourceHandler::OnReadCompleted(
166 int bytes_read, 165 int bytes_read,
167 std::unique_ptr<ResourceController> controller) { 166 std::unique_ptr<ResourceController> controller) {
168 DCHECK(!has_controller()); 167 DCHECK(!has_controller());
169 writer_.OnReadCompleted(bytes_read, 168 writer_.OnReadCompleted(bytes_read,
170 base::Bind(&ResourceController::Resume, 169 base::Bind(&ResourceController::Resume,
171 base::Passed(std::move(controller)))); 170 base::Passed(std::move(controller))));
(...skipping 22 matching lines...) Expand all
194 NOTREACHED(); 193 NOTREACHED();
195 } 194 }
196 195
197 void NavigationResourceHandler::DetachFromCore() { 196 void NavigationResourceHandler::DetachFromCore() {
198 DCHECK(core_); 197 DCHECK(core_);
199 core_->set_resource_handler(nullptr); 198 core_->set_resource_handler(nullptr);
200 core_ = nullptr; 199 core_ = nullptr;
201 } 200 }
202 201
203 } // namespace content 202 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_handler.h ('k') | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698